You are not logged in.

#1 13 Feb 2015 16:42

chinkitkit
Member
Registered: 16 Dec 2014
Posts: 14

pushd & popd

i don't really understand pushd syntax and popd syntax.

can somebody explain to me ?

for pushd, if i have a code like this "pushd c:\users\sohai_cibai_user\desktop\program", it will bring me to that specified directory.

am i correct for that ?

but i don't know to operate with popd at all.

haha, thanks in advanced.


Detour in life always surprise people.

Offline

#2 13 Feb 2015 16:53

DigitalSnow
Member
From: United States
Registered: 27 Dec 2012
Posts: 24

Re: pushd & popd

The documentation over at ss64.net shows the usage options for each command and also gives some examples.
http://ss64.com/nt/pushd.html
http://ss64.com/nt/popd.html

c:\Program Files> PUSHD c:\utils
c:\utils> PUSHD c:\Windows
c:\Winnt> 
c:\Winnt> POPD
c:\utils> 
c:\utils> POPD
c:\Program Files>

PushD and PopD operate upon the stack principle "LIFO".  You can read about it here http://en.wikipedia.org/wiki/Stack_(abstract_data_type)

Offline

#3 13 Feb 2015 18:48

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: pushd & popd

I just noticed that example on the POPD page is slightly wrong, so I've amended it now

c:\Program Files> PUSHD c:\utils
c:\utils> PUSHD c:\Windows
c:\Windows>
c:\Windows> POPD
c:\utils> 
c:\utils> POPD
c:\Program Files>

Offline

#4 24 Feb 2015 09:37

chinkitkit
Member
Registered: 16 Dec 2014
Posts: 14

Re: pushd & popd

For simon sheppard and digital snow,

thank you very very much on your time with this explanation.

I think i got it already. Thanks.

Thanks again...xD


Detour in life always surprise people.

Offline

Board footer

Powered by