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
How to remove associated function library?
How to check bitmap output value?
Can any suggest me what is exposure testing?
diff between qtp versions from 8.5
what is error and fault in terms of software quality?
How do you know the location Id of an object if you know its index id?
Is it possible to split an action? How?
Sql questions to find second max salary and how to use joins
wt is the use of multiple questions in QTP
How will you handle java tree in qtp?
How would you directly trigger javascript in a test?
How to find the length of the string in qtp?
what is the difference between built-i function and In-built function?
Hi All, How to Compare two strings character by character in QTP
Describe the differences between functions and actions in UFT?