Y
yawnmoth
Say I have the following *.cmd file:
@echo off
cd some_directory
cd ..
If I run it and some_directory exists, nothing will happen - I'll be
in the same directory as before. If, however, some_directory doesn't
exist, it'll take me back to the parent directory.
My question is.. how can I change this behavior? How can I make it
so that if some_directory doesn't exist, it doesn't do "cd .."? Maybe
I could do some sort of if statement and do the "cd .." conditionally?
@echo off
cd some_directory
cd ..
If I run it and some_directory exists, nothing will happen - I'll be
in the same directory as before. If, however, some_directory doesn't
exist, it'll take me back to the parent directory.
My question is.. how can I change this behavior? How can I make it
so that if some_directory doesn't exist, it doesn't do "cd .."? Maybe
I could do some sort of if statement and do the "cd .." conditionally?