up vote 0 down vote favorite
share [g+] share [fb]

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?

link|improve this question

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

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

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ.

2 Answers

up vote 2 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

link|improve this answer
feedback

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

link|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
feedback

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