Automated File Sorting Script for Windows
deFileStress
is a Python script designed to automate the sorting of files based on their types into specific directories. The script monitors the Downloads directory for any file modifications or creations and organizes the files into appropriate folders according to their types, such as documents, photos, music, videos, installers, archived files, and more.
- Python 3.x installed
watchdog
library installed (pip install watchdog
)
- Clone this repository or download the script file (
deScript.pyw
). - Create a folder named
deFileStress
in your Downloads directory. - If you want the script to run automatically on startup, create a shortcut of
deScript.pyw
and place it in the Windows Startup folder. You can find the Startup folder by pressingWindows + R
and typingshell:startup
.
- Run the script by double-clicking on
deScript.pyw
or executing it using a Python interpreter. - The script will continuously monitor the Downloads directory for file modifications or creations.
- Files will be automatically sorted into the appropriate directories based on their types.
- Documents:
.pdf
,.txt
,.pptx
,.docx
,.xlsx
,.xml
- Photos:
.jpg
,.png
,.jpeg
,.gif
,.psd
- Music:
.mp3
,.wav
,.flac
,.opus
- Videos:
.mp4
,.flv
,.wmv
,.mkv
,.avchd
,.mov
,.webm
,.avi
- Archived Files:
.zp
,.zip
,.rar
,.gz
- Installers:
.exe
,.msp
,.msi
,.apk
- Downloading Files:
.temp
,.tmp
,.crdownload
You can customize the script by modifying the script's variables, such as file type extensions and target directory names, to suit your preferences.
SCRIPT_DIR_IGNORE = ["\\deFileStress", "Downloads"]
SCRIPT_DIRS_IGNORE = ["deFileStress", "installers", "zips_folders", "unknown"]
# ... (Other extension lists)
# Configure these directories as needed
zipTargetPath = getTargetDir(dlPath, "zips_folders")
exeTargetPath = getTargetDir(dlPath, "installers")
# ... (Other target directories) ```