Table of contents

Cheat Sheet #

Scripts for the awesome ExifTool. I use them as part of my importing workflow

For all of the following commands, pwd must correspond to the folder containing the pictures to be scanned.

Show metadata #

exiftool -s -G
-s is used to show the names in ExifTool commands format. e.g.: instead of "Create Date" you see "CreateDate"
-G is used to show the metadata Group to which the metadata tag belongs.

Strip metadata #

exiftool "=-all"

File renaming #

Rename files based on their date and time data.

Images shot at the same moment (photo bursts, for example) are being sorted with increasing single-digit indexes.
Since there are many parameters which might contain conflicting times, there are several different tags which can be analyzed. I sorted them such that the first ones are the ones which are more likely to be found but probably not exact, while the last ones are very precise tags, but less likely to be found in an image metadata see this post on the ExifTool forum.
exiftool '-FileName<FileModifyDate' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r ./*
exiftool '-FileName<DateTimeCreated' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r ./*
exiftool '-FileName<DateTimeOriginal' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r ./*
exiftool '-FileName<CreateDate' -d %Y.%m.%d\ -\ %H.%M.%S%%c.%%le -r ./*
-r makes the analysis recursive: subfolders are scanned, too.

Directories #

Organize files in directories based on each image’s dimensions (resolution)

NOTE: newly created directories are created in pwd
"-Directory<imagesize" ./*

Move files to folders based on year and month

exiftool '-Directory<FileModifyDate' -d ./%Y/%Y.%m -r ./*
exiftool '-Directory<DateTimeCreated' -d ./%Y/%Y.%m -r ./*
exiftool '-Directory<CreateDate' -d ./%Y/%Y.%m -r ./*
exiftool '-Directory<DateTimeOriginal' -d ./%Y/%Y.%m -r ./*
exiftool '-Directory<GPSDateTime' -d ./%Y/%Y.%m -r ./*
add -o after exiftool to copy each image instead of moving it.

Resources #

Commands above are a personal adaptation of the ones I found from the following sources:

🏗 WIP section 🛠

This section should contain a beautifull graph displaying the relations among this note and all of the others on Unfortunately, showing it requires great coding skills and I am still working on it.