VBScript and Relative Path

Thread Starter

Mazaag

Joined Oct 23, 2004
255
Hi guys..

I have NO experience whatsoever with VBS. However I am very close to accomplishing what I need....

Rich (BB code):
set objFolder2 = objShell.Namespace("E:\Documents")
E:\ is my USB key, which changes with every computer..... I need to set this path such that it runs the folder "Documents" from the CURRENT directory of which the script is run.. ie: a relative path....

Thanks guys
 

DumboFixer

Joined Feb 10, 2009
217
Could you use this:
Rich (BB code):
currentpath = WScript.ScriptFullName
to get the path to the script, strip off the filename and add the required filepath
 
Top