This sample script shows how to process command line arguments using Windows Scripting Host. The example below would be used such that you would save this code off into args.vbs file. Open a command line . Type in args.vbs argument1 argument2 etc... just put spaces between your arguments. To obtain the latest scripting host engine, download from http://msdn.microsoft.com/scripting also download the scripting documentation. Set ArgObj = WScript.Arguments sArgCount = ArgObj.Count
For x = 0 to sArgCount - 1 msgbox ArgObj(x) Next
set ArgObj = Nothing |