vote up 0 vote down star

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?

flag

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

closed as exact duplicate by snark, innaM, ChrisF, harrymc, Phoshi Dec 18 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.

2 Answers

vote up 1 vote down check

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|flag
vote up 0 vote down

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|flag
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 at 15:18
You are right i've misunderstanded the question. (What poor figure!) :-( – Акула Dec 18 at 15:39

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