Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

marked as duplicate by Snark, innaM, ChrisF, harrymc, Phoshi Dec 18 '09 at 11:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Duplicate of this question: superuser.com/questions/81755/… –  Snark Dec 18 '09 at 10:12

2 Answers 2

up vote 4 down vote accepted

you can use the pushd and popd commands.

pushd will change directory from location a to location b popd will change directory back to directory a

share|improve this answer

Cmd.exe is an emulation layer for the old MS-DOS, commands are the same :

  1. One step backward = cd..
  2. All Backward = cd /

For the others look at some Ms-Dos table around the web

share|improve this answer
    
This is not what cd - does. If one is in /a/b/c/d then cd's to /a/e/f, cd - as a command returns you to /a/b/c/d, whereas cd .. moves you to /a/e and cd / moves you to /. –  Neal Dec 18 '09 at 15:18
    
You are right i've misunderstanded the question. (What poor figure!) :-( –  Акула Dec 18 '09 at 15:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.