Sunday, October 29, 2006 12:53 PM bart

Demo tip - Pushd & Popd

A little nice trick (on Windows XP and later) to navigate more quickly through folders is the use of pushd and popd. The names should ring the stack bell almost immediately. The commands are nothing more and nothing less than the cd command with stack support:

This one is on my demo tips-n-tricks list for quite a while and causes a bit of noise in the audience (depending on the geek level). Others include:

  • =rand() in Word to generate junk text
  • CTRL+click multiple items in the taskbar, right click and choose some option to arrange the windows
  • TAB completion in cmd.exe

amongst many others. | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Filed under: ,


# re: Demo tip - Pushd & Popd

Sunday, October 29, 2006 4:21 PM by TheMuuj

PUSHD/POPD works on Windows 2000, too (at least in SP4). PUSHD can also change to a network path, whereas CD cannot (which is probably my biggest annoyance with the command prompt in Windows today). It does so by creating a temporary share, starting with Z:, and working backwards. *Please* tell me that Windows Power Shell can change to a UNC path without a lot of hassle.

# re: Demo tip - Pushd & Popd

Saturday, November 04, 2006 7:47 PM by denis bider

I believe the PUSHD and POPD commands have been present in the 4DOS shell since some 17 years ago... way to go, Microsoft - adding this to Windows in 200x ;)