• Welcome to Jose's Read Only Forum 2023.
 

IWshShell3.CurrentDirectory Property

Started by José Roca, July 14, 2008, 07:05:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca



The following code displays the current active directory.

JScript


var WshShell = WScript.CreateObject ("WScript.Shell");
WScript.Echo (WshShell.CurrentDirectory);


VBScript


Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo WshShell.CurrentDirectory


PowerBASIC


DIM pWsh AS IWshShell3
pWsh3 = NEWCOM "WScript.Shell"
PRINT ACODE$(pWsh3.CurrentDirectory)