These commands are generally used in .bat i.e batch files but you can use them to navigate your way through windows directories.

What are these commands?
These commands are just like the commands in a normal stack. Pop pops an item of the stack, in this case this command is POPD(read Pop Directory) pops to the directory you saved earlier using pushd command.
Pushd is used to store a directory that you want to later pop back to .

Why use them?

We use them because it saves a lot of typing that is typing the entire directory path and using cd command every time.

How to use them?

Pushd: Use pushd [path] .You can use pushd several times to push different directories onto netsh stack.You can also view the stack[netsh stack] contents by just simply using pushd command.
Popd: just use Popd it takes no parameters.

For example
if you were working on the the directory "C:\temp"
use "Pushd .." for storing the current directory.
then you can go on and work on other directory lets say c:\windows
after that you can directly return to directory C:\temp by typing
POPD or Popd these commands are case insensitive

Sample Output:














For adding a network share use the following command

pushd \hostname\share_name

This command will create a temporary drive letter that points to the network share and then as usual command prompt will change and point to that share.