WSH » WScript » ScriptName

Syntax:
WScript.ScriptName

The ScriptName property is read only and returns the filename of the script currently being executed.

Examples

Code:
WScript.Echo "Name of current script =", WScript.ScriptName
Output:
Name of current script = test.vbs
Explanation:

This VBScript code illustrates the use of this property inside a script called "test.vbs".

Language(s): VBScript

See Also: