/folder-automation

Automating the process of sorting files in a selected folder by file type or extension.

Primary LanguagePythonMIT LicenseMIT

folder-automation

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.

Prerequisites

This script requires Python to be installed for it to run. To install Python, click here.

Usage

From a terminal, navigate into the project directory.

$ cd downloads-folder-automation

From here, you have two options:

  1. Run via the GUI, with both options and a popup with the target directory:

    $ python folder_sorter.pyw
    
  2. 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.

Contributing

Please read HOW_TO_CONTRIBUTE.md for details on submitting pull requests.

License

This project is licensed under the MIT license - see the LICENCE.md for details.

Acknowledgement

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: