Windows Script Host  

CurrentDirectory Property

Retrieves or changes the current active directory.

object.CurrentDirectory

Arguments

object
WshShell object.

Remarks

The CurrentDirectory returns a string that contains the fully qualified path of the current working directory of the active process.

Example

The following code displays the current active directory.

[VBScript]
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo WshShell.CurrentDirectory
[JScript]
var WshShell = WScript.CreateObject ("WScript.Shell");
WScript.Echo (WshShell.CurrentDirectory);

See Also

WshShell Object