This program enables continuous monitoring of one or more folders and manages the files within them, specifically sorting added files in the observed folder(s) into various subfolders.
To run the program, you need to install the following Python libraries:
dotenv
: Install withpip3 install python-dotenv
linkwatchdog
: Install withpip3 install watchdog
link
To execute the program, create a .env
file and initialize the variables as follows:
PATH_TO_SCAN
: Path to be scannedPATH_IMAGE
: Path to the image folderPATH_VIDEO
: Path to the video folderPATH_DOCUMENTS
: Path to the documents folderPATH_COMPRESSED
: Path to the compressed files folderPATH_EXECUTABLES
: Path to the executables folderPATH_NOT_RECOGNIZED
: Path to the unrecognized files folder
If you prefer not to write it manually, you can download a preconfigured .env
file from this link.
PATH_TO_SCAN = "/Users/name/Downloads"
PATH_DOCUMENTS = "/Users/name/Documents"
For automatic execution, create a link to the .vbs
file within the folder:
C:\Users\'USER NAME'\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
- File Handling: Gained hands-on experience in manipulating files using Python, utilizing functions to read, write, and move files.
- Path Manipulation: Acquired knowledge of constructing and managing file paths, ensuring cross-platform compatibility with methods like
os.path.join()
. - Directory Interaction: Explored directory operations, such as creating, deleting, and navigating directories, using functions from the
os
module. - Error Handling: Developed an understanding of handling potential errors, enhancing the script's robustness and reliability.
- Operating System Interaction: Deepened comprehension of Python's interaction with the underlying operating system for effective file and folder management.
- Documentation: Creating clear and concise documentation, such as this README file, helps users understand the purpose and usage of the script.
Feel free to get in touch via:
- ๐ง Email: [email protected]
- ๐ผ LinkedIn: Francesco Romeo