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 re-install QTP 9.0 trial version.

25 Answers  


when i was doing the Flight reservation with QTP calculating the tickets i got Type mismatch: '[string: ""]' in "If cdbl(tot)=cdbl(p)*t Then" error. where I am doing the mistake Could you please tell me.

5 Answers  


Hi all please solve this.It is urgent..... When I right clicked on a Web image manually It displayed Open link,open link in new window,save picture as, Email picture,Printpicture,propeties...etc. While automation I have written a code like this 'browser("Google").Page("ramseeker®: Memory and_3").Image ("graphOfModel").Click 10,10,micRightBtn But the right click menu was not displayed. I want to save that image in a seperate folder

6 Answers  


Is it possible to map an image as standard Object or u've to treat as virtual? how to map an Dynamic image into standard object?

1 Answers  


I am testing a Website thelancet and create a description for searching "health" in search edit box.But my description failed on last two lines.Can anybody solve this

1 Answers  


Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to use descriptive.create ()

6 Answers   IBM,


what is flag=0 in qtp tool.. i am strugglin to use flag function , exactly when it is used , any real time expert pls explain clearly?

1 Answers  


Mention what are the different types of recording modes in qtp? Which will be used when?

0 Answers  


Can you import and export data from XLS and how?

4 Answers  


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

0 Answers   BirlaSoft,


What is the exact difference between QTP and RFT ?

2 Answers   CTS,


How can you identify the browser and its information using QTP script?

0 Answers  


Categories