Hi,
Which command returns the script startup / current location? I'm looking for
the directory which contains the script not the current working directory.

Many thanks

Re: Script startup / current path? by ljb

ljb
Thu Feb 17 14:15:53 CST 2005


"Yaiz" <Yaiz@discussions.microsoft.com> wrote in message
news:7CD18F7D-9451-48F3-B9F7-07D28C8AED8C@microsoft.com...
> Hi,
> Which command returns the script startup / current location? I'm looking
for
> the directory which contains the script not the current working directory.
>
> Many thanks
>

CreateObject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).P
arentFolder



Re: Script startup / current path? by Michael

Michael
Thu Feb 17 20:23:17 CST 2005

> CreateObject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).P
> arentFolder

Or more simply (no intermediate File object needed)...

CreateObject("Scripting.FileSystemObject").GetParentFolderName(Wscript.ScriptFullName)


--
Michael Harris
Microsoft MVP Scripting
http://maps.google.com/maps?q=Sammamish%20WA%20US