find file if match using Date/Time Original with source file's date/time origina

Started by curtistealer, May 03, 2022, 03:31:41 AM

Previous topic - Next topic

curtistealer

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?


StarGeek

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.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

curtistealer

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.

StarGeek

Exiftool only processes one file at a time and can't directly compare between two separate files.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).