ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
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
 Question Submitted By :: Saranga
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 ?    0 Yes 2 No
Raghuram
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
What is the file extension of the code file & object repository file in QTP?  2
Hi Friends...this is surendra..recently i joined automation team ...Please send me some documents regarding VB script ...and where can i learn VB script... This is My mail id: surendra.mamilla@gmail.com... please send to my mail.... Thanx in advance surendra.  1
How to execute a WinRunner Script in QTP? IBM1
what type automation is fofollowed in the project? Satyam1
how can i replace any text from the qtp script with some anothere text Livetek1
Give me brief idea about QTP automation object model? TCS4
Difference between image checkpoint and bitmap checkpoint  2
How To write script in QTP For Field Validation Example: password Field is accepting A range 8-20 characters only.How to write script?  3
How to parameterize Object Repository?  2
After creating testcases, how do you start testing in QTP? what methodology will follow? American-Well7
How to get line numbers in your editor in expert view?  2
how we can do web browser using parametarisation in QTP ? Kanbay2
How 2check the color of the text in the textfield . say suppose the text entered in the textfield object is appearing in red. so i want to check whether the text is in red color or not. It could be great help for me if any one solve's my issue. plz...help Sinertel5
How can the name of a checkpoint be changed in Qtp Ordain-Solutions2
How to enter table check points?  2
Please give me the steps to carry out datadriven in QTP8.2  2
1. I have asked the same question for the third time, but i am getting wrong answers. Pls give me the script to count the number of edit boxes or checkboxes in an windows application screen. In windows application childobject is not working, anyone very urgent  8
how i will connect oracle or microsoft acess database through manually written Script Aurigo2
in qtp wha t is synchronisatin pt,what is the maximam time out  3
wt is memory leakage? BSL5
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com