The Argv array

One can use the argv variable to access the command line arguments passed to the script at the command line:

Using the command-line for specifying parameters to the program is usually more handy than using files or modifying the script each time.

Here's an example that writes a list of the arguments:
// File: argv.w_js
for (var i=0; i < Window.argc; i++)
    Window.TextOut(0, 50, 50 + (i * 20), Window.argv);
// File: argv.w_vbs
For i=0 To Window.argc
    Window.TextOut 0, 50, 50 + (i * 20), Window.argv(i)
Next
content
The new scripting host. It is not wscript.exe!
JScript and VBScript are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.