http://blog.sina.com.cn/s/blog_9a76f42e0102wl7d.html
pushd 目录压栈
popd 目录弹栈
使用这两个目录,可把命令执行目录在多个目录中进行切换
使用例子:
------------------------开始-------------------------------------
@echo off
cd /d x:\
echo inpath1=% cd% => inpath1= x:\
pushd x:\comp\
echo inpath2=% cd% => inpath2= x:\comp\
pushd x:\comp\src\
echo inpath3=% cd% => inpath3= x:\comp\src\
pushd x:\comp\file\
echo inpath4=% cd% => inpath4= x:\comp\file\
echo pushd_end
echo otpath1=% cd% => otpath1= x:\comp\file\
popd
echo otpath2=% cd% => otpath2= x:\comp\src\
popd
echo otpath3=% cd% => otpath3= x:\comp\
popd
echo otpath4=% cd% => otpath4= x:\
---------------------结束-----------------------------