Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Location to the script?

Status
Not open for further replies.

nerram

Programmer
Apr 23, 2003
56
IE
How do I find the location to a script?

EG My Script is stored at c:\Projects\Scripts\MyScript.vbs

I want the script to output its location
ie c:\Projects\Scripts\MyScript.vbs

But if it was stored at d:\MyScript.vbs it should output d:\MyScript.vbs
 
Hello nerram,
Code:
wscript.echo wscript.scriptfullname
wscript.echo wscript.scriptname
wscript.echo createobject("wscript.shell").currentdirectory
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top