O
O
OlDi_K2019-08-30 11:18:22
cmd/bat
OlDi_K, 2019-08-30 11:18:22

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

1 answer(s)
R
res2001, 2019-08-30
@OlDi_K

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 /?

All you have to do is link these commands correctly into a batch file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question