Using UNC paths from CMD: PushD & PopD


This has to be one of the most useful features I never new about (until about 4 weeks
ago).

C:\Documents and Settings\kmoore\Desktop>pushd \\server\userfiles\kmoore

Z:\kmoore>copy myfile.txt d:

1 file(s) copied.

Z:\kmoore>popd

C:\Documents and Settings\kmoore\Desktop>dir /b

myfile.text

This works with local drives, too. So if you working in My Documents and you
want to check something in %windir% you can just pushd %windr%, check
things out, then popd. Pretty cool.

Comments (0)

Skip to main content