Hi,
Yes, I know that this is an old topic, but I have a batch file that I am trying to alter and can't quite figure something out. I need to have something that will give me the current working directory...ie.
If the cwd is...
c:\Temp\Directory1\Directory2
I run the batch, I want to be able to set a variable to just 'Directory2'
set VAR1 = ????
The reason I need this is because I need to make this directory in a new location and case matters (won't go into why). So, I need to mkdir something like...
mkdir t:\Jobs\%VAR1%
and get...
t:\Jobs\Directory2
Is this possible using batch files?
Thanks for the help.
-Tyler
Yes, I know that this is an old topic, but I have a batch file that I am trying to alter and can't quite figure something out. I need to have something that will give me the current working directory...ie.
If the cwd is...
c:\Temp\Directory1\Directory2
I run the batch, I want to be able to set a variable to just 'Directory2'
set VAR1 = ????
The reason I need this is because I need to make this directory in a new location and case matters (won't go into why). So, I need to mkdir something like...
mkdir t:\Jobs\%VAR1%
and get...
t:\Jobs\Directory2
Is this possible using batch files?
Thanks for the help.
-Tyler