Skip to content

bash script for renaming pictures (and matching raw files) with the help of exiftool (linux) - date, camera name, serial numbers e.g.

License

Notifications You must be signed in to change notification settings

unixhex/exipicrename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

exipicrename

bash script for renaming pictures (and matching raw files) with the help of exiftool (linux) - date, camera name, serial numbers e.g.

Purpose:

  • Rename image files after their exif creation date and time
  • use format YYYYmmdd_HHMMSS (year in 4 digits, month, date, hour, minute, seconds in 2 digits)
  • Also rename matching orf (raw) + xmp (metadata) files with this same new name

If there are images created with the same date+time (more than one image per second) a counter to the name (avoid overwriting) will be added.

Alternativly set additional serial numbers (option -s)

This script did do what I expected on Linux OpenSuse Tumbleweed, 2019-02 for picture files created with Olympus(TM) DSL(R|M) and some older point and shot cameras.

Other OS / cameras might need changes on the script (e.g. your raw file name ending might be different -> see variable rawsuffix1 and RAWSUFFIX2).

Anyway, the script might not work as intended, files or directories might be deleted or damaged, so please use backups and common sense.

  • Requires package exiftool
  • Requires package "dateutils" for dateconv
  • Requires sed
exipicrename [option] JPG-Files.jpg
    renames jpg-files and matching rawfiles + xmp-files
    -h      | --help          this help
    -r[raw] | --rawdir [raw]  save raw files to separate directory [defaultname raw]
    -s[3]   | --serial 3      attach a serial number [default 3 digits]
    -d      | --datedir       move files to directory with date in the format YYYY-mm-DD
    -k      | --kamera        attach camera model name
    -l      | --length        attach lens focal length
    -a      | --aperture      attach aperture
    -m      | --meta [meta]   fresh after import meta file [optionally to separate directory [meta]]

About

bash script for renaming pictures (and matching raw files) with the help of exiftool (linux) - date, camera name, serial numbers e.g.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages