LoginSignup
3
4

More than 5 years have passed since last update.

ExifTool メモ

Last updated at Posted at 2017-11-19

自分用メモ。
バックアップを取って作業しましょう。

インストール

macOSの場合

brew install exiftool

撮影日時を指定した日時へ変更

-overwrite_original_in_place オプションにより元ファイルを直接変更します。
(デフォルト => 自動的にバックアップファイルを作成)

exiftool -overwrite_original_in_place \
  -d "%Y/%m/%d %H:%M:%S" -datetimeoriginal="2014/03/22 17:40:00" *

生成日時とファイル変更日時を撮影日時へ変更

exiftool -overwrite_original_in_place -d "%Y-%m-%d %H:%M:%S" \
  "-filemodifydate<datetimeoriginal" "-createdate<datetimeoriginal" *

日時系項目 (DateTimeOriginal, CreateDate, ModifyDate) を親ディレクトリ名 (フォーマット: Y-m-d) から取得して、無理やり変更

変更後の時間は 00:00:00 固定

exiftool -d "%Y-%m-%d %H:%M:%S" -overwrite_original_in_place \
  '-alldates<${directory;s/.*\/(.*)/$1/} 00:00:00' *

Advanced formatting feature

Exifに記載されている日付通りのディレクトリ (例: 2017/2017-11-19) へ移動

ExifTool evaluates the command-line arguments left to right, and latter assignments to the same tag override earlier ones

exiftool -d %Y/%Y-%m-%d \
  "-directory<filemodifydate" "-directory<createdate" "-directory<datetimeoriginal" *

ファイル名、ディレクトリ名、日付系項目をCSV出力

exiftool -csv -d '%Y-%m-%d %H:%M:%S' \
  -Filename -Directory -DateTimeOriginal -CreateDate \
  -ModifyDate -FileModifyDate * | tee /tmp/exiftool.csv
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4