Click to See Complete Forum and Search --> : Command Line Arguments In VBScript?
Tom Frohman
May 22nd, 2003, 12:31 PM
Is it possible to run a VBScript with command line arguments?
If it is possible, could someone show me a simple example of how to access the command line values?
Thanks, Tom
Satishpp
May 22nd, 2003, 04:23 PM
Use the arguments collection
Paste the following code in .. say.. test.vbs
--------------------
For Each arg In wscript.arguments
msgbox arg
Next
----------------------
Call test.vbs from the command line
test.vbs a b
Satish
Tom Frohman
May 23rd, 2003, 06:44 AM
Thank you much. It worked fine. For some reason neither of the two books I have on learning VBScript mention this.
Tom
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.