Several Exiftool commands I have used to edit/sort my pictures and improve metadata. Using this as my personal notepad, so to speak; might be useful for someone.
When it comes to mass editing lots of files, nothing beats the command line. ExifTool is great for this.
Exiftool show all available EXIF tags of a fileexiftool -G1 -a -s <filename>
exiftool -validate -warning -error -a FILE
exiftool -v -overwrite_original "-datetimeoriginal<${filename;$_=substr($_,0,15)}" "-createdate<${filename;$_=substr($_,0,15)}" "-FileCreateDate<${filename;$_=substr($_,0,15)}" "-FileModifyDate<${filename;$_=substr($_,0,15)}" "-TrackCreateDate<${filename;$_=substr($_,0,15)}" "-MediaCreateDate<${filename;$_=substr($_,0,15)}" "-MetaDataDate<${filename;$_=substr($_,0,15)}" "-MediaModifyDate<${filename;$_=substr($_,0,15)}" "-TrackModifyDate<${filename;$_=substr($_,0,15)}" "-ModifyDate<${filename;$_=substr($_,0,15)}" -ext m4v -ext mov -ext mp4 .
exiftool -v "-filename <${CreateDate}.%e" -d %Y%m%d-%H%M%S .
exiftool -v -overwrite_original "-ImageUniqueID<NewGUID" "-Photoshop:IPTCDigest=" "-CurrentIPTCDigest=" "-XMP-xmp:CreatorTool=" "-datetimeoriginal<${filename;$_=substr($_,0,15)}" "-createdate<${filename;$_=substr($_,0,15)}" "-MetaDataDate<${filename;$_=substr($_,0,15)}" "-ModifyDate<${filename;$_=substr($_,0,15)}" -ext jpg .
You could also add the following to the above command to change the system file and date:
"-FileCreateDate<${filename;$_=substr($_,0,15)}" "-FileModifyDate<${filename;$_=substr($_,0,15)}"
.
Beware that this might interfere with backup software or Onedrive.
Exiftool set all dates of PDF files to first 10 characters of the file name (f. ex. useful for files that are named like "2020-03-21 Text.pdf")exiftool -v -overwrite_original "-FileModifyDate<${filename;$_=substr($_,0,10)} 13:00:00" "-xmp:CreateDate<${filename;$_=substr($_,0,10)} 13:00:00" "-xmp:ModifyDate<${filename;$_=substr($_,0,10)} 13:00:00" "-pdf:CreateDate<${filename;$_=substr($_,0,10)} 13:00:00" "-pdf:ModifyDate<${filename;$_=substr($_,0,10)} 13:00:00" "-CreateDate<${filename;$_=substr($_,0,10)} 13:00:00" "-FileCreateDate<${filename;$_=substr($_,0,10)} 13:00:00" "-FileAccessDate<${filename;$_=substr($_,0,10)} 13:00:00" "-ModifyDate<${filename;$_=substr($_,0,10)} 13:00:00" -ext pdf .
for %I in (*.pdf) do ( gswin64c.exe -dNOPAUSE -dBATCH -dNumRenderingThreads=4 -sDEVICE=jpeg -r300 -dJPEGQ=80 -dFirstPage=1 -dLastPage=2 -sOutputFile="%~nI_p%02d.jpg" "%~I" )
exiftool -v -overwrite_original "-datetimeoriginal<${filename;$_=substr($_,0,10)} 13:00:00" "-createdate<${filename;$_=substr($_,0,10)} 13:00:00" "-FileCreateDate<${filename;$_=substr($_,0,10)} 13:00:00" "-FileModifyDate<${filename;$_=substr($_,0,10)} 13:00:00" "-MetaDataDate<${filename;$_=substr($_,0,10)} 13:00:00" "-ModifyDate<${filename;$_=substr($_,0,10)} 13:00:00" "-FileAccessDate<${filename;$_=substr($_,0,10)} 13:00:00" -ext jpg .
exiftool -v -v -r -ext mp4 -overwrite_original -tagsfromfile %d%f.mp4 -all:all -xmp:all -exif:all -composite:all -quicktime:all -iptc:all -gps:all %d%f.xmp .
exiftool -v -r -overwrite_original -tagsfromfile %d%f.xmp -all:all -xmp:all -exif:all -composite:all -quicktime:all -iptc:all -gps:all -ext m4v -ext mov -ext mp4 -ext avi .
exiftool -overwrite_original -r -if "not $XMP-dc:Subject=~/Locatie/" "-XMP-dc:Subject<XMP-digiKam:TagsList" "-XMP-microsoft:LastKeywordXMP<XMP-digiKam:TagsList" -XMP-microsoft:LastKeywordIPTC= -IPTCDigest= -IFD0:XPKeywords= -ext jpg -ext jpeg -ext mp4 -ext m4v -ext mov .
exiftool -v -ext jpg -ext mp4 "-Directory<CreateDate" -d %Y\%m\%d\ .
exiftool -v -ext jpg -ext mp4 "-Directory<CreateDate" -d %Y\%m\ .
exiftool -v -ext jpg -ext mp4 "-Directory<CreateDate" -d %m\ .
cd "%userprofile%\OneDrive\Afbeeldingen\Eigen foto's"
exiftool -r -v -ext mp4 -ext mov -ext m4v "-Directory<C:\Users\<USER>\OneDrive\Video's\$CreateDate" -d %Y\%m\%d\ .
exiftool -v -r -d %Y\%m\%d\%Y%m%d-%H%M%S%%-c.%%e "-filename<CreateDate" .
exiftool -r -overwrite_original "-xpcomment<${filename" "-comment<${filename" "-title<${filename" "-xptitle<${filename" .
exiftool -p "$directory/$filename" -ext jpg -q -q -r -if "not $gpslatitude" .
exiftool -r -validate -warning -a -ext:jpg .
exiftool -p "$directory/$filename" -r -if "(not $createdate)" .
exiftool -r -d "%Y%m%d" -if "$FileName !~ /^$DateTimeOriginal/" -p "$directory/$filename" .
exiftool -r -d "%Y%m%d" -if "$FileName !~ /^$CreateDate/" -p "$directory/$filename" .
exiftool -p "$directory/$filename" -r -if "(not $datetimeoriginal)" .
exiftool -p "$directory/$filename" -r -if "(not $datetimeoriginal or $createdate)" .
exiftool -overwrite_original -all= -tagsfromfile @ -all:all -unsafe -icc_profile -ExifVersion=0232 -makernotes= .
exiftool -overwrite_original -makernotes:all= .
exiftool -overwrite_original -v -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-ModifyDate<PhotoTakenTimeTimestamp" "-CreateDate<PhotoTakenTimeTimestamp" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext jpg -overwrite_original
exiftool -r -ext jpg -overwrite_original -m -v -if "($RegionName) and (not $RegionRectangle)" -Keywords+="Has-MS-Face-but-no-XMP-face" .
exiftool -p "$directory/$filename" -r -if "($XMP-digiKam:TagsList=~/INSERT-NAME-HERE/i) and (not $RegionPersonDisplayName=~/INSERT-NAME-HERE/i)" .
exiftool -r -ext jpg -overwrite_original -m -if "($XMP-digiKam:TagsList=~/INSERT-NAME-HERE/i) and (not $RegionPersonDisplayName=~/INSERT-NAME-HERE/i)" -XMP-digiKam:TagsList+="Check" .
exiftool -T -Directory -Filename -RegionPersonDisplayName -r -ext jpg . > PeopleTags.txt
exiftool -r -v -overwrite_original -ext jpg "-filename<\${make;} ${model;}\%f.%e" .
exiftool -overwrite_original -all= <filename>
Useful for if many pictures do not have the CreateDate exif-property, but do have the DateTimeOriginal exif-property. If you want the CreateDate exif-property to have the same value as the DateTimeOriginal exif property:
exiftool -overwrite_original '-createdate<datetimeoriginal' -r -if '(not $createdate and $datetimeoriginal)' <your directory>
The .movs and .mp4s should be in the same directory with the same file name, only a different extension
exiftool -v -tagsfromfile %d%f.mov "-all:all>all:all" -overwrite_original -ext mp4 .
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4