Automating the process of removing metadata from files using ExifTool.
Before running the script, ensure you have the following installed:
- Clone the Repository.
git clone https://github.com/ahmadzaid1/ExifToolAuto.git
cd ExifToolAuto
- Make the script executable.
chmod +x metaDataRemover.py
- Run the script:
python3 metaDataRemover.py
This script will start monitoring the Downloads directory for new files and automatically remove their metadata.
By default, the script will stop working if the session is closed or the computer is shut down. To ensure the script runs automatically every time you turn on your computer, you can add it as a service to your systemd
.
Open a terminal and create a new service unit file for your script. For example:
- Create a systemd Service Unit File:
sudo nano /etc/systemd/system/metaDataRemover.service
- Add Service Configuration:
[Unit]
Description=Metadata Remover Service
After=network.target
[Service]
Type=simple
User=yourusername
ExecStart=/usr/bin/python3 /path/to/metaDataRemover.py
WorkingDirectory=/path/to/Downloads/directory
Restart=on-failure
[Install]
WantedBy=multi-user.target
- Save and Close the File
In Nano, press Ctrl+O
, then Enter
to save the file. Press Ctrl+X
to exit Nano.
- Reload systemd:
sudo systemctl daemon-reload
- Enable the Service to Start on Boot:
sudo systemctl enable metaDataRemover.service
- Start the Service:
sudo systemctl status metaDataRemover.service
This repository provides scripts to automate the process of removing metadata from files using ExifTool. For more information about ExifTool and its usage, you can refer to the original ExifTool repository.
- ExifTool Repository: exiftool/exiftool
The remove_metadata.sh script logs its actions to a file named metadata_removal.log in the Downloads directory. This log file contains information about each file processed by the script.
- The script was tested on Debian-based Linux distributions only.
- The tool only removes files supported by Exiftool.
- The script has been written to monitor the Downloads directory. If you prefer to monitor a different directory, you can modify the following line in the script:
DOWNLOADS_DIR = os.path.expanduser("~/Downloads") # Change this to your desired directory
This project is licensed under the The Unlicense - see the LICENSE file for details.