William Bartholomew

Musings on software engineering, technology and Aspergers Syndrome.

Adhoc Mapping of Network Drives

leave a comment »

There is a feature in Windows XP and Vista that not many people know which can save you endless hours and it’s called pushd.

From the command-line if you type:

pushd \\someserver\someshare\somedirectory

Then Windows will automatically map a temporary drive to \\someserver\someshare, change to that drive, then change directory to somedirectory.

When you’re finished you can then type:

popd

Then Windows will change back to your original working directory and remove the mapped drive.

Here is an example:

C:\Temp\> pushd \\someserver\someshare\somedirectory
X:\somedirectory\> del somefile.txt
X:\somedirectory\> popd
C:\Temp\ >

Enjoy!


Written by wbarthol

December 19, 2007 at 11:40 am

Posted in sysadmin, utility

Leave a Reply