TIPS: how to find the current directory using VBSCRIPT


Two solutions,
1.
currentDirectory = left(WScript.ScriptFullName,(Len(WScript.ScriptFullName))-(len(WScript.ScriptName)))

2.
currentDirectory = CreateObject(“Scripting.FileSystemObject”).GetAbsolutePathName(“.”)

Advertisements

2 thoughts on “TIPS: how to find the current directory using VBSCRIPT

  1. You recommend “nwaha.org” on the section “Top Clips”. It is known that a malicious website…
    Are you a moron or faker?..

  2. set objshell = Wscript.CreateObject(“Wscript.Shell”)
    Wscript.echo (objshell.CurrentDirectory)

    set objFSO = CreateObject(“Scripting.FileSystemObject”)
    sCurPath = objFSO.GetParentFolderName(Wscript.ScriptFullName)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s