Getting the name of the folder that the .bat is running from
Posted: 14 Jul 2009 13:39
I've read through many of the samples on this site and I must say very nice work. I sort of like trying to do things in dos not because it is the easiest but because it is like solving a puzzle.
Anyway I've experimented with my current puzzle long enough and it's time to ask all you smart people out there (who probably already know the answer in your sleep)
if i reference the %0 arg i seem to have options to either get the file name of the batch, ext, path, drive letter, etc.
all i am looking for is the name of the folder the .bat is in (the last part of %~dp0)
thanks in advance (i'm sure i'll have harder puzzles in the future)
Anyway I've experimented with my current puzzle long enough and it's time to ask all you smart people out there (who probably already know the answer in your sleep)
if i reference the %0 arg i seem to have options to either get the file name of the batch, ext, path, drive letter, etc.
all i am looking for is the name of the folder the .bat is in (the last part of %~dp0)
thanks in advance (i'm sure i'll have harder puzzles in the future)