Answer the question
In order to leave comments, you need to log in
What is the easiest way to sort files in a folder by format and not by extension?
Utility/script to sort say jpg to jpg folder, pdf to pdf, etc. Ideally, it would be broken jpg in, say, the jpg [cor] folder.
Answer the question
In order to leave comments, you need to log in
If you have Windows 10 and you are not against perversions, then you can use the Windows Subsystem for Linux:
[email protected]:/mnt/d/TEMP$ find .
.
./archive.zip
./document.pdf
./picture.jpg
[email protected]:/mnt/d/TEMP$ for F in *; do T=`file -b --mime-type "$F"`; mkdir -p "$T"; mv "$F" "$T/$F"; done
[email protected]:/mnt/d/TEMP$ find .
.
./application
./application/octet-stream
./application/octet-stream/archive.zip
./application/pdf
./application/pdf/document.pdf
./image
./image/jpeg
./image/jpeg/picture.jpg
You can enter .jpg in the explorer itself in the search, it will display all files with this extension, press ctrl + A, this will select all the files and then transfer them to another folder.
If you want to do it more automatically, then google BAT files:
copy *.jpg D:\oldfiles\*.jpg - copy all files with jpg extension from the current directory to the D:\oldfiles directory
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question