This Bash script is a simple yet powerful automation tool that renames multiple image files in a folder by adding each file’s original creation date and time (from its EXIF metadata) to the filename. Instead of renaming photos manually, the script processes all images at once, making it easy to keep large photo collections organized and consistently labeled.
By pulling the actual date and time each picture was taken, the script ensures your filenames reflect the true capture moment — not when the file was copied or edited. This makes it especially useful for backing up, archiving, or sorting images chronologically, whether they come from phones, cameras, or different devices.
Although originally inspired by the needs of photographers, this script is designed for anyone who wants better photo organisation — from casual users managing family albums to professionals keeping structured backups.
In short, this script saves time, removes the hassle of manual renaming, and helps you maintain a tidy, well-organized image library — automatically.
need to install exiftool
- find how to install it on your distro.
👣 Make the file executable:
chmod +x picture-name-date-time.sh
👣 Copy it into the images' folder in case
👣 Run the script...
./picture-name-date-time.sh
Before using this script, make sure to back up your original image files. While the script is designed to rename files safely, unexpected issues (like interrupted processes or incorrect metadata) could still lead to unwanted results. Having a backup ensures your photos remain safe no matter what happens.
This script is provided “as is”, without any warranty of any kind, either expressed or implied. The author assumes no responsibility for data loss, damage, or any other issues that may arise from using or modifying this script. Use it at your own discretion and risk.