Working Directory

M

Mr. Novice

What is the best way to have a batch file check itself to
see if it's being executed from a unc path or drive
letter?

Chad
 
M

Mr. Novice

Perfect! Thank you!!

I had thought of having it check to see if it was being
run from the windows directory but didn't like that. The %
~d0 works great!!

Chad
 
M

Matthias Tacke

Mr. Novice said:
What is the best way to have a batch file check itself to
see if it's being executed from a unc path or drive
letter?

Chad

Without having seen your question, I wrote and posted a batch just some
hours ago in amb which examines the origin of the running batch.

http://groups.google.com/[email protected]

Of course using the same commands mentioned by Ray repective Clay.
May also be useful to count the folder levels independent of unc/drive
letter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top