Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to pass a variable in Dos Command using QTP?
Eg:
Dim path1, path2
path1 = "C:\Test\sample1.doc"
path2 = "C:\Test\sample2.doc"

How can we pass these path1 and path2 inside the "copy" dos
command?
I tried like this. this is not working.

oShell.run "cmd /K copy" &path1 &path2

Answer Posted / raghuram

Dim oShell
Set oShell = CreateObject ("WSCript.shell")
oShell.run "cmd /K CD C: & Dir"
Set oShell = Nothing

I was able to do in this way....you can try and let me know

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to know no.of mails in our g mail by using vb-script

2221


What is the script for database check point, bitmapchek point, regular expression ?

2048


Does quicktest professional is unicode compatible?

949


How to handle the exceptions using the recovery scenario manager in qtp?

1034


Explain the keyword driven framework for the window based application complete creation of library files,env file,test data,recovery file,excel file ,repository etc and as a test engineer how is ur approach

2045


What VBScript operators, functions, and statements do you use in QuickTest Professional?

2661


if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp

25710


What is keyword view?

997


How to run a test using quicktest professional (qtp)?

1144


Is QTP supports Unix. If yes, then how the test automation is done?

2184


How is test case write?

1038


How to call a test from another test?

1371


What is use of object spy?

1078


Explain the concept of object repository and how quicktest professional recognises objects?

1017


To which environments does quicktest professional (qtp) supports?

1015