Hello,
Working on nightlights.
I try to move, in DOS (with windows XP and a * .bat) - from a root folder - a set of files to subfolders that the batch creates simultaneously, and to which it assigns names in relation to file numbering.
A series of files named a_1.bmp, b_1.bmp, c_1.bmp, ... will be moved to a subfolder named 1.
A series of files named a_2.bmp, b_2.bmp, c_2.bmp, ... will be moved to a subfolder named 2.
A series of files named a_myfile.bmp, b_myfile.bmp, c_myfile.bmp, ... could be moved to a subfolder named myfile.
Some files might have names as: a_001396.bmp, b_001396.bmp..etc. And the corresponding subfolders named 001396, 001 397 ...
I found a code template ( and made some change for my use ) that might be appropriate ... (in French...)
https://openclassrooms.com/forum/sujet/dossiers-automatiquement-en-fonction-des-fichiers
... but I stumble on an obstacle:
beyond ..._9.bmp, and starting from _1.bmp, the script no longer creates subfolders.
Starting from ..._10.bmp or more, it works.
But I have no choice, at first sight, but to start from ..._1.bmp.
Not even ..._01.bmp
Attachment for testing.
If someone have an idea.
:hmm:
And thank you.
Edit: I'm quite a great beginner in DOS.
Working on nightlights.
I try to move, in DOS (with windows XP and a * .bat) - from a root folder - a set of files to subfolders that the batch creates simultaneously, and to which it assigns names in relation to file numbering.
A series of files named a_1.bmp, b_1.bmp, c_1.bmp, ... will be moved to a subfolder named 1.
A series of files named a_2.bmp, b_2.bmp, c_2.bmp, ... will be moved to a subfolder named 2.
A series of files named a_myfile.bmp, b_myfile.bmp, c_myfile.bmp, ... could be moved to a subfolder named myfile.
Some files might have names as: a_001396.bmp, b_001396.bmp..etc. And the corresponding subfolders named 001396, 001 397 ...
I found a code template ( and made some change for my use ) that might be appropriate ... (in French...)
https://openclassrooms.com/forum/sujet/dossiers-automatiquement-en-fonction-des-fichiers
... but I stumble on an obstacle:
beyond ..._9.bmp, and starting from _1.bmp, the script no longer creates subfolders.
Starting from ..._10.bmp or more, it works.
But I have no choice, at first sight, but to start from ..._1.bmp.
Not even ..._01.bmp
Attachment for testing.
If someone have an idea.
:hmm:
And thank you.
Edit: I'm quite a great beginner in DOS.
Attachments
Last edited: