WshScript.Arguments

Echo a text string to the screen (cscript) or a dialogue box (wscript)

Syntax 
      Wscript.Echo MyObject(I)
      Wscript.Echo MyObject.item(I)
      Wscript.Echo MyObject.Count 
      Wscript.Echo MyObject.Length

The default property is .item

Example

' Display all command-line parameters
Set objArgs = Wscript.Arguments

For I = 0 to objArgs.Count - 1
   Wscript.Echo objArgs(I)
Next 

Related commands:

WshShell.Shortcut.Arguments

Equivalent Windows NT command:

Parameters - Command Line Parameters


Back to the Top

Simon Sheppard
SS64.com