Answer the question
In order to leave comments, you need to log in
How to sort files into folders using part of the filename?
Good day!
There is a folder that contains hundreds of thousands of files like xxxxxxx-yyyyyy.bin
Tell me with a batch file or cmd command, you need to sort these files into xxxxxxx folders, creating them on the go if they are not there.
Answer the question
In order to leave comments, you need to log in
It is quite easy to do this with a batch file:
1. traversing the directory using
2. Cutting the file name using
3. creating a directory
4. transferring a file to a directory
Help:
for /?
md /?
move /?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question