I have many files in my external harddrive, so I want to automatically tell the computer to sort all my files into folders, by their size, extension, name and other variables. Is there any program that will allow me to perform these tasks. Please teach me how to install it too.
If you're OK to use bash commands, you should look the man page for the find command .
With this line, you can move all .txt files bigger or equal than 600KB into the bigTextFolder folder. You can find a lot of documentation about find on the net (Beginner Linux Guide) and the list of all tests available in the man page (first link).
To understand the command, look arguments:
.
is the directory wherefind
will look for file. You can replace that by the path of your HDD.-name \*.txt
is the name filter. It can use wildcards(*) if you escape them with . You can read this like "Find all the file with a name ended by .txt". Replace that by the pattern you're looking for:find . -name a\*
find . -name aba.txt
-size +599k
is the size filter. Here you say "Find all the file with a size strictly superior too 599KB". Change 599 to the size you want, and k is just the unit.-exec
allows to execute another command once a file is found. So here, for each file found, we domv fileFounded targetFolder
. The{}
will be replace by your result. This part has to end with\;
.Keep in mind that you have a lot of other filters: type, date, owner, permissions,...
I am not aware of some readily available program for it, but you can write a shell script by combining commands like
will display files in reverse order of size.
and you can use it in combination with NorTicUs's script mentioned in post above
to specify dynamic size by replacing 599K with variable holding output of 1st command.
I'm making a Python script that sort files by their extensions. In the future it will have more features but I think that this can help you https://github.com/phaalonso/FileOrganizer