Newbie can't get condition to work (MacOS)

Started by fantafly, December 08, 2020, 11:41:41 PM

Previous topic - Next topic

fantafly

Hello

New to exiftool, but already a fan.

I have a large number of quicktime files, some of which have their Rotation tag set to 90.
I need these to be set to 0, but because many of them are larger than 30GB the overwrite takes very long so I wanted to use a condition to skip all those that are already at 0.

However, I can't get the condition to work.
This is just one of my many attempts:

exiftool -api largefilesupport=1 -if '$EXIF:Rotation == 90' -overwrite_original_in_place -Rotation=0 DIR

I wrote an apple script that works, but still curious how this would have to look as a terminal command.


set theFolderR to choose folder
tell application "Finder"
repeat with thisNameR in (get name of files of theFolderR)
set thisRot to do shell script "/usr/local/bin/exiftool -s -s -s -Rotation '" & POSIX path of theFolderR & thisNameR & "'"
if thisRot = "90" then do shell script "/usr/local/bin/exiftool -api largefilesupport=1 -overwrite_original_in_place -Rotation=0 '" & POSIX path of theFolderR & thisNameR & "'"
end repeat
end tell


Any takers?

Many thanks




StarGeek

I don't believe Rotation is an EXIF tag.  Try simply -if '$Rotation == 90'

You can double check the group by adding -G (-groupNames) option to a command to list output.  For example, try
exiftool -a -s -G1 -Rotation /path/to/file/
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

fantafly