Jump to Real's How-to Main page

Access arguments on the command line

[args.vbs]

Dim arg

If WScript.Arguments.Count = 0 Then
   WScript.Echo  "no argument on the command line."
Else
   For each arg in WScript.Arguments  
      WScript.Echo "arg : "  & arg 
   Next
End If

WScript.Quit(0)

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]