Link to home
Start Free TrialLog in
Avatar of superleo
superleo

asked on

VBScript problem.

Dear all experts,

I would like to write a .vbs VBScript program to popup the current path. How can I get such result?

TestPath.vbs
-----------------------------
msgbox (App.Path)

It is seem that the App.Path is not work in above program.

Please advise, thank you very much.

superleo
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This will get the file and/or folder path

scriptfile = WScript.ScriptFullName
Msgbox scriptfile

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(scriptfile)
Msgbox f.ParentFolder

Leon
Avatar of superleo
superleo

ASKER

Thanks.