Access arguments on the command lineTag(s): WSH VBScript


[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)

blog comments powered by Disqus