How do I get the parent path of the current %CD%.
For instance:
ECHO %CD%
result: C:\Windows\System32
(This does not work)
ECHO %CD%..\
desired result: C:\Windows
How do I get the parent path of the current %CD%.
For instance:
ECHO %CD%
result: C:\Windows\System32
(This does not work)
ECHO %CD%..\
desired result: C:\Windows
Try changing the current directory and then using %cd%
:
pushd ..
echo %cd%
popd