ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: curtistealer on May 03, 2022, 03:31:41 AM

Title: find file if match using Date/Time Original with source file's date/time origina
Post by: curtistealer on May 03, 2022, 03:31:41 AM
I would like to find file from dir that matches Date/Time Original with source file.

exiftool -DateTimeOriginal -s3 0503_16-11_345.JPG

gives me
2022:05:03 15:58:36

I would like to find file in specific dir and return its filename that matches 2022:05:03 15:58:36

Is it possible?

Title: Re: find file if match using Date/Time Original with source file's date/time origina
Post by: StarGeek on May 03, 2022, 10:37:00 AM
Your command would be
exiftool -if "$DateTimeOriginal eq '2022:05:03 15:58:36' " -Filename /path/to/files/

Swap the double/single quotes if using Mac/Linux.
Title: Re: find file if match using Date/Time Original with source file's date/time origina
Post by: curtistealer on May 04, 2022, 02:27:15 AM
Quote from: StarGeek on May 03, 2022, 10:37:00 AM
Your command would be
exiftool -if "$DateTimeOriginal eq '2022:05:03 15:58:36' " -Filename /path/to/files/

Swap the double/single quotes if using Mac/Linux.

'2022:05:03 15:58:36' this part is variable that comes from different file..
So what I meant was If I can set value from file as variable..

sorry for my bad english.
Title: Re: find file if match using Date/Time Original with source file's date/time origina
Post by: StarGeek on May 04, 2022, 02:50:37 AM
Exiftool only processes one file at a time and can't directly compare between two separate files.