Archive for the ‘Sample Code – Misc’ Category


Passing Command Line Arguments

‘================================================================= ‘ NAME: Arguments01.vbs ‘ AUTHOR: Neal Walters ‘ http://VBScript-Training.com ‘================================================================= Option Explicit Dim strFilename, strCommand strFilename = WScript.Arguments(0) strCommand = ucase(WScript.Arguments(1)) ‘validate input parameters If strCommand “COPY” And strCommand “MOVE” Then WScript.Echo “This program requires two arguments: ” & VbCrLf & _ “CScript Arguments01.vbs filename cmd ” & VbCrLf & _ ” where cmd [...]

Read More...