Something neat I did was working with command line parameters in VBScript. You can access the command line arguments array through
Wscript.Arguments(i)
where i goes from 0 upwards. So, if you’ve got one argument option you could handle it like this
If Wscript.Arguments.Count = 0 Then
‘ Do Proceed as Normal
Else
If Wscript.Arguments(0) = “/something” Then
RunFunctionA
End If
End If
If [...]
Posts Tagged ‘parameter’
Sweet VBScript – command line parameters
Posted in VBScript, Work, tagged command line, parameter, switch, VBScript on January 10, 2008 | 2 Comments »