A python script that helps organization your folder, putting your files into different (sub)folders based their extensions.
Set up the path of the folder
mainPath = r"c:/Users/user_name/destination_1/..."
For example: I want to organize my Desktop
mainPath = r"c:/Users/Nathan/Desktop"
Depends on how you want to organized your files/folders, you set up the way you like based on this template
folderName = {
"folder_1": {'type_of_file_1', 'type_of_file_2'},
"folder_2": {'type_of_file_1', 'type_of_file_2'},
...
}
For example: I only have code, compressed files, images, and document need to be organized. So I made 4 main folders and 'Others' for files that are not accounted for
folderNames = {
"Compressed": {'7z','zip', 'rar'},
"Programming": {'py', 'js', 'html', 'css', 'java', 'c', 'cpp', 'sql'},
"Documents": {'pdf', 'doc', 'docx'},
"Images": {'jpg', 'png', 'gif', 'svg', 'bmg'},
"Others": {'NONE'}
}
If you are someone who has music, video, etc. You can add something like:
"Music": {'mp3','mpa','wav'},
'Videos':{'avi','flv','mkv','mov','mp4','wmv'}
python organizer.py