Skip to content

Instantly share code, notes, and snippets.

View oliverste's full-sized avatar

Oliver Stellbrink oliverste

View GitHub Profile
@oliverste
oliverste / update_exif_dates.sh
Last active May 25, 2024 13:27
This script processes files in a specified directory and updates their modification and creation dates based on available EXIF metadata (DateTimeOriginal, CreateDate, ModifyDate). If the original dates are missing or invalid, it attempts to use alternative timestamps. The script also updates corresponding .MP4 files if they exist. I used this sc…
#!/bin/bash
# Set the directory to process (update this path to the desired directory)
directory="/path/to/your/photos"
# Toggle to ignore the incorrect modification date check (set to "true" or "false")
ignore_incorrect_mod_date=false
# Echo the directory being processed
echo "Processing directory: $directory"