Automating the process of sorting files in a user's folder on Windows by file type.
This script iterates through the files in a user's folder on Windows and places each file in its appropriate folder, it can sort by categories or by extensions. There's a config file that contains the categories.
This script requires Python to be installed for it to run. To install Python, click here.
From a terminal, navigate into the project directory.
$ cd downloads-folder-automation
From here, you have two options:
-
Run via the GUI, with both options and a popup with the target directory:
$ python folder_sorter.pyw
-
Run via the command line, here you specify the method and folder to be sorted, with Download's Path as the default one (best for automation):
$ python folder_sorter.pyw sort_c $ python folder_sorter.pyw sort_c "<path>" $ python folder_sorter.pyw sort_e "<path>"
To have the script run automatically, configure it in Windows Task Scheduler according to this tutorial.
Please read HOW_TO_CONTRIBUTE.md for details on submitting pull requests.
This project is licensed under the MIT license - see the LICENCE.md for details.
I drew a lot of inspiration for this script from Nitish Sharma's medium article. Many thanks to the following people who helped me optimize my code: