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



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

Answer / 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

More QTP Interview Questions

what r the main attributes of test automation?

0 Answers  


What are the types of data tables in qtp?

0 Answers  


In qtp, how you can exit for loop?

0 Answers  


how interviews will be on QTP?

0 Answers   Fidelity,


What is time parameter?

1 Answers  


diff between dim & redim ? in detailed? pls any one explain me?

1 Answers  


can any body tell me how i create a simple script and apply output value on it .pls send me a step by step process

0 Answers  


Where we can use the synchronization?

0 Answers  


What type of automation frame work you are using?and why?

2 Answers   Wipro,


Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.

2 Answers  


Count the number of radio buttons and randomly select one.

1 Answers   Deloitte,


1)what is the quality process in QTP? 2)how to add the .tsr file in qtp through scripting?

1 Answers   L&T,


Categories