Jump to content
Sign in to follow this  
Dryden

Detecting Script Path and/or drive

Recommended Posts

Dryden

Hi! I need some help, do any of u guys know a way of a script detecting where it's being runed from?

For example. I wanted a script that I could copy to any place and it outputs 2 things: The full path where it is located and the drive lerrer (c:\d:\e:\etc.). So if I put my scprit in c:\windows\myscript.exe, whe I run it it should output 2 variables whith the folowing values: $var1="c:" "$var2="\windows\"

I dunno if I'm making sense, but i think I am. :S

Any Ideas on how to do this?

thx in advance.


"Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett.

Share this post


Link to post
Share on other sites
Valuater

@ScriptFullPath

then use _PathSplit()

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×