Use file details if EXIF data does not exists

Started by remco, February 18, 2023, 07:11:46 AM

Previous topic - Next topic

remco

Is it possible to organize (thus move a file to a destination) based on the file property date in case the photo does not contain any EXIF data?

Phil Harvey

Yes.  Run "exiftool -G1 -s FILE" on a file to see what information is available.  Any extracted information may be to rename and/or move the file.  The available filesystem properties are shown in the System group.  If you are on MacOS, add -API requestall=2 to also get the MacOS system properties.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

This example shows how you can rename based upon several tags, depending upon what data exists in the file.  It is based upon Note #1 under the -TAG[+-^]=[VALUE] option.
     Many tag values may be assigned in a single command. If two assignments affect the same tag, the latter takes precedence

So you could try to rename upon a tag such as DateTimeOriginal and then fall back on FileModifyDate if the DateTimeOriginal doesn't exist.
exiftool -d "%Y-%m-%d_%H.%M.%S%%+c.%%e" "-Filename<FileModifyDate" "-Filename<DateTimeOriginal" /path/to/files/
"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