[Solved] Ascend one directory in a hierarchy?
Posted: 07 Feb 2011 15:46
Mh,
when I'm in a specific folder in a directory hierarchy, how do I get one hierarchy higher?
I can't use a full path (dir names will be random and I'm already in such a dir when the script is invoked) but
the ascending has to be done relative to the current dir.
e.g. I'm in: D:\Temp\foobar and I want the script to change the dir to D:\Temp
is bringing me back to the last directory before I switched (manually) to D:\Temp\foobar
(in this case D:\Users\Admin\Downloads)
Tia,
Highend
when I'm in a specific folder in a directory hierarchy, how do I get one hierarchy higher?
I can't use a full path (dir names will be random and I'm already in such a dir when the script is invoked) but
the ascending has to be done relative to the current dir.
e.g. I'm in: D:\Temp\foobar and I want the script to change the dir to D:\Temp
Code: Select all
goto "..\";
(in this case D:\Users\Admin\Downloads)
Tia,
Highend