how to use shell.run
[Originally posted by anu]
hai in my application i want to use shell.run method to change my directory path and then executing DIR command.for that i am using syntax:
ÿ Set xshell = CreateObject("wscript.shell")
ÿ xshell.run "command /K CD C:\ & Dir"
It opening cmd window but giving error "too many parameters &"
how can i use there two commands in a single statement?
Re:how to use shell.run
[Originally posted by Phlip Bradbury]
You can use ChDir("C:\") (it probably has a different name in .net) to change directory and then use shell.run
another thing to try (which may or may not work) is to use "command \k cd C:\ " & Chr(20) & " dir" - if you type 2 commands seperated with ^T (chr(20)) it runs them as seperate commands
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center