If you use the popd command with command extensions enabled, the popd command removes the drive-letter assignment created by pushd.
To change the current directory from the one in which the batch program was run, and then to change it back:. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Add a comment. Active Oldest Votes. C: dir pause rem using pushd to other path pushd Users dir pause rem using popd to exit current pushd directory popd dir pause.
Improve this answer. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Greg Shultz shows you how to use PushD and PopD to save time and aggravation when you need to use temporary drive mapping. Have you ever needed to temporarily map a drive letter to a network location for a quick file operation while you were working from a Command Prompt?
However, that 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. Be your company's Microsoft insider by reading these Windows and Office tips, tricks, and cheat sheets.
Delivered Mondays and Wednesdays. This blog post is also available in the Slideshow Photo Gallery format. As you can see, using Windows Explorer's network drive mapping feature really isn't that complex, but it does require a multitude of steps.
Run the command below:. As you have observed, the pushd and popd commands are useful in navigating from one directory to another. As you get used to the command, you will have a faster and efficient way of navigating through your directories in Linux. Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays. The pushd and popd commands allow you to work with directory stacks in Linux and Unix-like operating systems.
They are used to add and remove directories from your directory stack. Karim Buzdar Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications.
0コメント