Possible Duplicate:
Can windows command line support Linux “cd -”?
Under Linux, I can use cd - to return to the last directory. How can I do that on Windows?
2 Answers
You can use the pushd and popd commands.
pushd <dir>will change directory from location a to location bpopdwill change directory back to directory a
Example:
pushd %TEMP% // go to user's temp dir, and remember pushd \Windows // go to windows dir, and remember popd // go back one dir, in this case the temp dir popd // go back one more dir, in this where you were before temp 2Cmd.exe is an emulation layer for the old MS-DOS, commands are the same :
- One step backward = cd..
- All Backward = cd /
For the others look at some Ms-Dos table around the web
4