Skip to content

TechRepublic

  • Top Products Lists
  • AI
  • Developer
  • Payroll
  • Security
  • Project Management
  • TechRepublic Academy
  • Innovation
  • Cheat Sheets
  • Cloud
  • 5G
  • Big Data
  • TechRepublic Premium
  • Top Products Lists
  • AI
  • Developer
  • Payroll
  • Security
  • Project Management
  • TechRepublic Academy
  • Innovation
  • Cheat Sheets
  • Cloud
  • 5G
  • Big Data
  • See All Topics
  • Sponsored
  • Newsletters
  • Forums
  • Resource Library
TechRepublic Premium
Join / Sign In
Microsoft

Slideshow: Quick networking mapping with PushD and PopD

By greg shultz May 15, 2012, 4:01 AM PDT

Image
1
of 5

Fig_A_5-12.png
Fig_A_5-12.png
Slideshow: Quick networking mapping with PushD and PopD

In Windows 7, the Map network drive command appears on the Command Bar.

In Windows 7, the Map network drive command appears on the Command Bar.

ntHave you ever needed to temporarily map a drive letter to a network location for a quick file operation while you are working from a command prompt? Of course, you can switch over to Windows Explorer and use the Map Network Drive command. While that is a viable solution, it requires multiple steps to create and then you have to perform several more steps to disconnect the network drive. This can be a pain – especially when you’re working from a Command Prompt. Fortunately, you can use a pair of often overlooked Command Line tools still available in Microsoft Windows 7, PushD and PopD, to quickly map network drives.

n

ntIn this edition of the Windows Desktop Report, I’ll show you how to PushD and PopD for temporary drive mapping. As I do, I’ll explain how these two old DOS utilities work.

n

ntnn

n

ntThe Map Network Drive command

n

ntJust for the sake of comparison, let’s begin by taking a look at all the steps involved in temporarily mapping a network drive in Windows Explorer. When you need to map a network drive from within Windows Explorer you can pull down the Tools menu and select the Map network drive command. If you are running Windows 7 with its context sensitive Command Bar, when you open Computer, the Map network drive command appears on the Command Bar.

n

ntThis Slideshow is also availabe as a post in the TechRepublic Microsoft Windows Blog.

n

ntImage by Greg Shultz for TechRepublic.

Slideshow: Quick networking mapping with PushD and PopD

If you have connected to the drive before, you can find the network path on the Folder drop down

If you have connected to the drive before, you can find the network path on the Folder drop down

ntWhen you see the Map Network Drive window you use the Drive drop down to select a drive letter. Then, you can use the Folder drop down to select a drive you’ve previously mapped or click the Browse button and use the Browse For Folder dialog box to locate the network folder that you want to map to a drive. Be sure to leave the Reconnect at logon check box unselected.

n

ntImage by Greg Shultz for TechRepublic.

Slideshow: Quick networking mapping with PushD and PopD

To disconnect, just select the icon and click OK

To disconnect, just select the icon and click OK

ntWhen you are done using the drive, you must then return to Windows Explorer, pull down the tools menu and then select the Disconnect network drive command. When you see the Disconnect Network Drive dialog box  just select the drive icon and click OK.

n

ntAs you can see using Windows Explorer’s network drive mapping feature really isn’t that complex but it does require a multitude of steps. This is especially apparent when you see how quickly the same operation can be performed using the PushD/PopD commands.

n

ntImage by Greg Shultz for TechRepublic.

Slideshow: Quick networking mapping with PushD and PopD

The PushD and PopD commands in action

The PushD and PopD commands in action

ntThe PushD/PopD commands

n

ntAs you may know, the PushD and PopD commands have been around since Windows 2000 and are quite powerful little commands that can save you quite a bit of time when you are working on the command prompt. However, they are often overlooked.

n

ntBasically, the PushD/PopD commands are used to maintain a history list of directory paths in what is called a directory stack. In addition, these commands function like the Change Directory (CD) command.

n

ntThe syntax for the PushD command is:

n

ntpushd [path]

n

ntWhen you use it, the PushD command stores the current path in the directory stack and then immediately changes to the specified path. When you use the PopD command, it retrieves the path at the top of the stack and changes to that path.

n

ntFor example, if you are currently in the C:\Users\Greg\Documents directory and you type the command:

n

ntpushd c:\users\public

n

ntThen the C:\Users\Greg\Documents path is stored in the directory stack and the current directory becomes C:\Users\Public. When you are done working in the C:\Users\Public directory, you just type:

n

ntpopd

n

ntWhen you do, the C:\Users\Greg\Documents path is retrieved from the directory stack and the current directory becomes C:\Users\Greg\Documents.

n

ntImage by Greg Shultz for TechRepublic.

Slideshow: Quick networking mapping with PushD and PopD

Mapping a network drive with the PushD and PopD commands is a piece of cake

Mapping a network drive with the PushD and PopD commands is a piece of cake

ntMapping network drives

n

ntIn addition to making it easy to change back and forth between directories, the PushD and PopD commands also work with network paths. When working with network paths, the syntax for the PushD command is:

n

ntpushd \\Server\Share\path

n

ntWhere \\Server\Share\path is the network resource to which you want to map a drive letter. As soon as you use it, the PushD command will instantly map a drive letter to the network resource and then change to that drive right in the Command Prompt window. When you’re done, just type PopD and the mapped drive letter will be disconnected and you’ll return to your original drive.

n

ntKeep in mind that, the PushD command allocates drive letters from Z: on down and will use the first unused drive letter that it finds.

n

ntImage by Greg Shultz for TechRepublic.

  • Microsoft
  • Account Information

    Share with Your Friends

    Slideshow: Quick networking mapping with PushD and PopD

    Your email has been sent

Share: Slideshow: Quick networking mapping with PushD and PopD
Image of greg shultz
By greg shultz
My first computer was a Kaypro 16 \"luggable\" running MS-DOS 2.11 which I obtained while studying computer science in 1986. After two years, I discovered that I had a knack for writing documentation and shifted my focus over to technical writing.
  • Account Information

    Contact greg shultz

    Your message has been sent

  • |
  • See all of greg's content

TechRepublic Premium

  • TechRepublic Premium

    Checklist: Network and systems security

    Cybersecurity demands and the stakes of failing to properly secure systems and networks are high. While every organization’s specific security needs form a unique and complex blend of interconnected requirements, numerous security fundamentals almost always apply to each of these groups. It stands to reason that cybersecurity pros who effectively identify network and systems risks ...

    Published:  June 1, 2023, 4:00 PM EDT Modified:  June 2, 2023, 7:48 AM EDT Read More See more TechRepublic Premium
  • TechRepublic Premium

    How to host multiple websites on Linux with Apache

    In this guide from TechRepublic Premium we’re going to explore the various things you can do with a Linux server. We won’t leave out any steps, so you won’t have to refer to another tutorial to complete the process. The only step we will leave out is the installation of Linux, as we’ll assume you ...

    Downloads
    Published:  May 31, 2023, 4:00 PM EDT Modified:  June 1, 2023, 7:45 AM EDT Read More See more TechRepublic Premium
  • TechRepublic Premium

    How to deploy an application with Kubernetes

    If you want to deploy applications into a Kubernetes cluster, be warned — it’s not the easiest task. There are a lot of moving pieces that go into these scalable containers. Don’t you wish you had a complete roadmap, from start to finish, to walk you through the process of deploying the Kubernetes cluster, deploying ...

    Downloads
    Published:  May 31, 2023, 4:00 PM EDT Modified:  June 1, 2023, 7:51 AM EDT Read More See more TechRepublic Premium
  • TechRepublic Premium

    Cross-training tool kit

    The more flexibility you can create in your technology workforce, the better you’ll be equipped to manage tomorrow, whatever the future brings. Too often, we focus on helping our teams become technical specialists who know volumes about a single technology, but quickly lose sight of how that technology connects with others. This makes their skills ...

    Downloads
    Published:  May 30, 2023, 4:00 PM EDT Modified:  May 31, 2023, 4:50 PM EDT Read More See more TechRepublic Premium

Services

  • About Us
  • Newsletters
  • RSS Feeds
  • Site Map
  • Site Help & Feedback
  • FAQ
  • Advertise
  • Do Not Sell My Information

Explore

  • Downloads
  • TechRepublic Forums
  • Meet the Team
  • TechRepublic Academy
  • TechRepublic Premium
  • Resource Library
  • Photos
  • Videos
  • TechRepublic
  • TechRepublic on Twitter
  • TechRepublic on Facebook
  • TechRepublic on LinkedIn
  • TechRepublic on Flipboard
© 2023 TechnologyAdvice. All rights reserved.
  • Privacy Policy
  • Terms of Use
  • Property of TechnologyAdvice