Use pushd to help you get back

by Wayne Maples [Published on 20 April 2004 / Last Updated on 20 April 2004]

commandline warriors can use pushd to their advantage. Lets say your current directory is

F:\Documents and Settings\wayne\Local Settings>

and you want to get back here. Use the pushd DOS command.

pushd .

that is push the current UNC, machine, drive and directory onto the stack. Yes the "." is understood as the current location. Then change drives, directories as much as you wish and when you get ready to come back, don't try to remember the location or if you can't, don't type in that ugly path. Use the popd DOS command to get back. Type


the Windows NT / Windows 2000 / Windows XP DOS emulator will bring you back to

F:\Documents and Settings\wayne\Local Settings>

If you work at the commandline, you will like it. If you have a unix background, you will recognize some of the things you can do with pushd and popd. Try it!

See Also

See Also

Featured Links