2024-11-12: ExifTool 13.03 is now available
Quote from: StarGeek on November 19, 2024, 10:00:02 PMRemove .%%le from the date format string.
Add .$FileTypeExtension'-FileName<FileModifyDate.$FileTypeExtension' \
'-FileName<${ModifyDate;$_ = undef if $_ lt "1971"}.$FileTypeExtension' \
'-FileName<${DateTimeOriginal;$_ = undef if $_ lt "1971"}.$FileTypeExtension' \
'-FileName<${CreateDate;$_ = undef if $_ lt "1971"}.$FileTypeExtension' \
---- System ----
FileModifyDate : 2024:04:13 17:19:47-04:00
FileAccessDate : 2024:11:19 23:09:23-05:00
FileCreateDate : 2024:11:19 23:08:25-05:00
---- QuickTime ----
CreateDate : 2024:04:13 17:14:27
ModifyDate : 2024:04:13 17:14:27
---- Track1 ----
TrackCreateDate : 2024:04:13 17:14:27
TrackModifyDate : 2024:04:13 17:14:27
MediaCreateDate : 2024:04:13 17:14:27
MediaModifyDate : 2024:04:13 17:14:27
---- Track2 ----
TrackCreateDate : 2024:04:13 17:14:27
TrackModifyDate : 2024:04:13 17:14:27
MediaCreateDate : 2024:04:13 17:14:27
MediaModifyDate : 2024:04:13 17:14:27
---- Track3 ----
TrackCreateDate : 2024:04:13 17:14:27
TrackModifyDate : 2024:04:13 17:14:27
MediaCreateDate : 2024:04:13 17:14:27
MediaModifyDate : 2024:04:13 17:14:27
---- Track4 ----
TrackCreateDate : 2024:04:13 17:14:27
TrackModifyDate : 2024:04:13 17:14:27
MediaCreateDate : 2024:04:13 17:14:27
MediaModifyDate : 2024:04:13 17:14:27
---- System ----
FileModifyDate : 2023:03:31 21:59:36-04:00
FileAccessDate : 2024:11:19 23:11:39-05:00
FileCreateDate : 2024:11:19 23:08:00-05:00
---- QuickTime ----
CreateDate : 2023:04:01 01:57:30
ModifyDate : 2023:04:01 01:57:30
---- Track1 ----
TrackCreateDate : 2023:04:01 01:57:30
TrackModifyDate : 2023:04:01 01:57:30
MediaCreateDate : 2023:04:01 01:57:30
MediaModifyDate : 2023:04:01 01:57:30
---- Track2 ----
TrackCreateDate : 2023:04:01 01:57:30
TrackModifyDate : 2023:04:01 01:57:30
MediaCreateDate : 2023:04:01 01:57:30
MediaModifyDate : 2023:04:01 01:57:30
---- Track3 ----
TrackCreateDate : 2023:04:01 01:57:30
TrackModifyDate : 2023:04:01 01:57:30
MediaCreateDate : 2023:04:01 01:57:30
MediaModifyDate : 2023:04:01 01:57:30
---- Track4 ----
TrackCreateDate : 2023:04:01 01:57:30
TrackModifyDate : 2023:04:01 01:57:30
MediaCreateDate : 2023:04:01 01:57:30
MediaModifyDate : 2023:04:01 01:57:30
'-FileName<FileModifyDate.$FileTypeExtension' \
'-FileName<${ModifyDate;$_ = undef if $_ lt "1971"}.$FileTypeExtension' \
'-FileName<${DateTimeOriginal;$_ = undef if $_ lt "1971"}.$FileTypeExtension' \
'-FileName<${CreateDate;$_ = undef if $_ lt "1971"}.$FileTypeExtension' \
Quote from: StarGeek on November 19, 2024, 08:39:04 PMHow is it not working? What is the exact output?
exiftool -F -overwrite_original_in_place -api LargeFileSupport \
-ext '*' \
-FileOrder DateTimeOriginal -FileOrder CreateDate -FileOrder ModifyDate -FileOrder -FileSize -FileOrder FileModifyDate \
-api QuickTimeUTC \
-d "%Y_%m_%d_%H_%M_%S_%%.2nc.%%le" \
'-AllDates<FileModifyDate#' \
'-AllDates<${ModifyDate#;$_ = undef if $_ lt "1971"}' \
'-AllDates<${DateTimeOriginal#;$_ = undef if $_ lt "1971"}' \
'-AllDates<${CreateDate#;$_ = undef if $_ lt "1971"}' \
'-FileName<FileModifyDate' \
'-FileName<${ModifyDate;$_ = undef if $_ lt "1971"}' \
'-FileName<${DateTimeOriginal;$_ = undef if $_ lt "1971"}' \
'-FileName<${CreateDate;$_ = undef if $_ lt "1971"}' \
-r "$dir_path"
exiftool -r \
-if '(($MIMEType eq "image/jpeg" and $FileName !~ /\.(jpg|jpeg)$/i) or \
($MIMEType eq "image/png" and $FileName !~ /\.png$/i) or \
($MIMEType eq "image/gif" and $FileName !~ /\.gif$/i) or \
($MIMEType eq "image/bmp" and $FileName !~ /\.bmp$/i) or \
($MIMEType eq "image/tiff" and $FileName !~ /\.(tiff|tif)$/i) or \
($MIMEType eq "image/heif" and $FileName !~ /\.(heif|heic)$/i) or \
($MIMEType eq "image/webp" and $FileName !~ /\.webp$/i) or \
($MIMEType eq "video/mp4" and $FileName !~ /\.mp4$/i) or \
($MIMEType eq "video/quicktime" and $FileName !~ /\.mov$/i) or \
($MIMEType eq "video/x-msvideo" and $FileName !~ /\.avi$/i) or \
($MIMEType eq "video/x-matroska" and $FileName !~ /\.mkv$/i) or \
($MIMEType eq "video/webm" and $FileName !~ /\.webm$/i) or \
($MIMEType eq "video/x-flv" and $FileName !~ /\.flv$/i) or \
($MIMEType eq "video/mpeg" and $FileName !~ /\.(mpeg|mpg)$/i) or \
($MIMEType eq "video/3gpp" and $FileName !~ /\.3gp$/i) or \
($MIMEType eq "video/ogg" and $FileName !~ /\.ogv$/i) or \
($MIMEType eq "video/MP2T" and $FileName !~ /\.ts$/i) or \
($MIMEType eq "video/x-ms-wmv" and $FileName !~ /\.wmv$/i) or \
($MIMEType eq "video/x-m4v" and $FileName !~ /\.m4v$/i))' \
-p '${FileName}: ${MIMEType}' "$dir"