CMD change directory to parent directory n times

batch-file, cmd, directory, parent

Solution

when typing at the cmd prompt:

cd .. and enter
uparrow and enter
uparrow and enter

In a batch file:

cd ..
cd ..
cd ..

or this:

for /L %%a in (1,1,3) do cd ..

Problem

I don't know very much about `cmd` so I wonder if there is a shortcut to go n levels up with something like, for example: ``` cd ..^3 ``` instead of: ``` cd ../../.. ``` Related.

Original source