Exists Method (Windows Script Host)
Updated: September 2010
Indicates whether a specific key value exists in the WshNamed object.
object.Exists(key)
Consider the following information typed at the command line.
cscript myScript.vbs /c:"WSH is a wonderful thing"
You could use these two lines of Visual Basic Scripting Edition (VBScript) code to determine whether the following command line switches were used to start the script.
WScript.Echo WScript.Arguments.Named.Exists("C")
WScript.Echo WScript.Arguments.Named.Exists("D")
Applies To:
Community Additions
Show: