I have a batch file and I want to do the following...
cd C:\some\directory
some开发者_如何转开发_command.cmd
# return to the directory I started in here
python some_script.py
As you can see in the commented line, I need some way to return to the directory I started in. How can I do this?
You can try pushd and popd commands see http://en.wikipedia.org/wiki/Pushd_and_popd
set OLDDIR=%CD% rem current directory
rem your script
chdir /d %OLDDIR% rem go to OLDDIR
精彩评论