shorter version of batch file: getting directory and parent directory
Posted by Jeroen Pluimers on 2013/08/17
Two years ago, I posted a batch file that gets the parent directory of the batch file that runs.
It was convoluted, using substrings and intermediate environment variables so you needed setlocal.
This one does not any more: for both the directory of the batch file, and the parent directory of that directory, one-liners suffice: