Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
May 14, 2006
In a batch script, you can determine the the folder path of your script by using the %~DP0 parameter.
To determine the folder path of a Vbscript, use:
sn = Wscript.ScriptName ' Script Name fn = Wscript.ScriptFullName ' Fully Qualified Script Namefp = Replace(fn, "" & sn, "") ' Drive / Folder pathWscript.Echo fp
You May Also Like