I need to make a .bat file for many people that would be placed in a specific folder and then move specific files from said folder to another folder above the current working directory.
I don't have the paths of where they have said folders, I need to use relative commands.
I know how to move files to lower directories, but don't know how to move them to higher ones.
Here's what I managed (no skills needed, I know) to do that moves files to lower directories.
mkdir "Oudated-do-not-move"
move ThaLuru.shader %cd%/"Oudated-do-not-move"
move DeLin.shader %cd%/"Oudated-do-not-move"
the list of "move..." lines is way larger but not needed here.
However, I do not know how to make the folder above current folder. At all.
For a test, after making the folder manually, I tried the following option to move file:
move DeLin.shader ../"Oudated-do-not-move" - it works.
But I do not know how to make the folder with batch file instead of manually.
I tried these:
mkdir ../test
mkdir %cd%/../test
mkdir %cd%/test
/because it works a lot of the time, and doesn't really give you an idea why when it doesn't work. In Windows/historically was more used for command switches. – Mokubai Sep 03 '23 at 16:01/is not recognized as a path separator in any version of MS-DOS AFAIK. It is only a path separator on NT based versions of Windows. You can get away with using them incmds.exeand likewise batch files if you put the path in quotes. – PC Luddite Sep 04 '23 at 18:42