CurrentDir - vbscript

This is elsewhere, just writing it here so I can find it easier myself...

 strCurrentDir = Left(Wscript.ScriptFullName, (InstrRev(Wscript.ScriptFullName, "\") -1))

Published Friday, September 08, 2006 2:44 PM by skissinger
Filed under:

Comments

# re: CurrentDir - vbscript

Another nice way to do this is via the GetParentFolderName method of FSO.

strCurrentDir = objFSO.GetParentFolderName(Wscript.ScriptFullName)

Wednesday, June 18, 2008 2:34 PM by dthomson