This script automatically moves files from a choosen directory to defined subdirectories.
-
Prerequisites
Before you start, you should have Python 3 with Pip installed.
Then set up a virtual environment and install the required packages inside the project.
pip install -r requirements.txt
-
Configure your paths
Now you can configure your source and destination path in a .env file. There is a .env.example file, that you can rename and use.
SOURCE_DIR=/Users/youruser/Desktop DESTINATION_DIR=/Users/youruser/Documents
You can also change the logic on how to determine different paths for each file in the get_destination function in functions.py.
-
Start the script.
You can start the script manually or set up a cron job to do so.
python main.py