This repository contains two scripts for organizing folder and providing notifications when changes occur in the specified folder. This system automates file organization and keeps you informed about file-related events.
- Linux-based operating system (tested on Ubuntu).
- Python 3.x.
inotifywait
library for monitoring file changes (sudo apt install inotify-tools
) forfile_watcher.sh
.notify-send
utility for notifications (pre-installed on most Linux systems) forfile_watcher.sh
.
file_organizer.py
is a Python script designed to manage and organize files based on their file extensions. It categorizes files into different folders, making it easier to keep your folder tidy.
- Organizes files into categories like documents, images, videos, and more.
- Logs events and actions in
file_organizer.log
. - Customizable sorting rules and destination directories.
- Open
file_organizer.py
. - Modify the variable
DIRECTORY_TO_ORGANIZE_PATH
to the path of the directory you want to organize or set an environment variable with the same name. - Save the changes.
To use the file_organizer.py
script:
python3 file_organizer.py
file_watcher.sh is a Bash script that complements the file organizer by monitoring changes in the specified folder and displaying notifications using notify-send
.
- Monitors the specified folder and the
file_organizer.py
script for changes. - Sends notifications for events like file moves and script reloads.
Customize the DIRECTORY_TO_ORGANIZE_PATH
environment variable to specify the folder to monitor.
To use the file_watcher.sh script:
chmod +x file_watcher.sh
./file_watcher.sh &
Note : The & at the end of the command runs the script in the background. You can also run the script in a separate terminal window.
Feel free to customize the scripts to suit your specific needs. You can modify sorting rules, notification messages, and more according to your preferences.
Contributions are welcome! If you have ideas for improvements or new features, please open an issue or create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.