CMD将目录更改为父目录n次

And*_*and 2 directory cmd batch-file parent

我不太了解cmd所以我想知道是否有一个快捷方式可以用例如:

cd ..^3
Run Code Online (Sandbox Code Playgroud)

代替:

cd ../../..
Run Code Online (Sandbox Code Playgroud)

有关.

fox*_*ive 10

在cmd提示符下键入时:

cd .. and enter
uparrow and enter
uparrow and enter
Run Code Online (Sandbox Code Playgroud)

在批处理文件中:

cd ..
cd ..
cd ..
Run Code Online (Sandbox Code Playgroud)

或这个:

for /L %%a in (1,1,3) do cd ..
Run Code Online (Sandbox Code Playgroud)