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
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL