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

How to do excception handling ( error handling ) in QTP

6 Answers   Institute for Medical Education,


In key word driven framework,we will rename the logical names of objects,why?

3 Answers   Liquid Hub,


1) What is the diff Between GetRoproprty and Gettoproperty? 2)What is Redim?

5 Answers   STC,


Difference between test object and run time object?

0 Answers  


assume i have few url link how will i dynamically call then using descriptive programming?

0 Answers   BirlaSoft,


difference Between Call Run action and copy of action?

3 Answers   Quest,


Explain the Load testing process?

1 Answers   Crea,


I want some banking domain projects where can i get this projects ( anybody can help me plz)

3 Answers  


How to import the Test Results in QTP to an Excel sheet

4 Answers   Sonata,


Please anybody can tell the where can i get the information about pharma and bank testing, i put the pharma&bank projects in my resume, so i dont know what to tell about them, so where can i get the information and what we test for these, i need domain information, what r the screen we test?

0 Answers  


Explain the QTP Tool interface.

2 Answers   Crea,


Explain QTP using different development techniques ?

0 Answers  


Categories