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

Is qtp supports uni-code?

987


Hoe can we do retesting using functions please give the code for it using login page

1909


What phases are involved in testing an application in qtp?

947


What is the Command used to start the QTP

1908


How to execute a winrunner script in quicktest professional?

981


if anyone has idea of the interview procedure in covansys, plz send me a mail?

1916


How can you give wait up to 10 seconds in qtp?

972


There is an excel file of 1 to 100 sheets how you will iterate through it?

954


Define Error Pane of UFT?

1067


what is run-time data?

2149


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

1881


For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?

979


Explain the concept of how quicktest professional (qtp) identifies object?

966


I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?

999


How to export quicktest professional (qtp) results to an .xls file?

1114