Monitor any folder and sort your files and folders inside it automatically
- Sort files based on extension as defined in the
config.json
- Sort folders based on maximum type of extensions present in the folder
- Install python 3.X
- Create virtualenv:
python -m venv env
- Activate the environment:
- Linux:
source env/bin/activate
- Windows:
env\\Scripts\\activate
- Install requirements:
pip install -r requirements.txt
- Defining
config.json
:- Structure
{ "include": { "extension-name": "path/to/folder/for/extension" }, "ignore": ["extension-name"], "others": "path/to/misc/folder" }
- Example
{ "include": { "exe": "C:\\Users\\Username\\Downloads\\Software" }, "ignore": ["tmp", "crdownload"], "others": "C:\\Users\\Username\\Downloads\\MISC" }
Note: Not having "others" in configuration will give you errors if that extension file is not defined in the config already. The folders defined for every extension will be created automatically. Configuration can be modified during runtime, it is loaded everytime a file is detected (can lead to performance issues for a large batch).
- Run the script:
python monitor.py "path/to/folder/to/monitor"