In what ways can I separate the original from edited files?

Started by J4c06r1nw1s, January 04, 2022, 06:07:21 AM

Previous topic - Next topic

J4c06r1nw1s

In what ways can I separate the original from edited files?

I have this now.
exiftool . -if '(($DateTimeOriginal or $createdate) < $ModifyDate)' -s -FileName -DateTimeOriginal -createdate -ModifyDate
This also doesn't work and gives a file not found message.

I want to check if the ModifyDate is a few minutes or seconds newer than the DateTimeOriginal or createdate.

Or is there a better way?

I've also seen that an edited file has an XMPToolkit tag added and sometimes a HistorySoftwareAgent tag.

Which way do you use for that?

Is there also a short way here for something like this for example:
'-FileName<${XMPToolkit;s/.+/EDITED/}%f.%e'
This way is not correct because when I convert a NEF to a DNG I also get an XMPToolkit tag.

Using ExifTool v12.37 on Linux

Phil Harvey

Quote from: J4c06r1nw1s on January 04, 2022, 06:07:21 AM
This also doesn't work and gives a file not found message.

I see no way that this command could give that message.  "." should always exist.

QuoteI want to check if the ModifyDate is a few minutes or seconds newer than the DateTimeOriginal or createdate.

You could do this (to find files with a 3 minute difference):

exiftool -if '($datetimeoriginal or $createdate) + 180 < $modifydate' -d %s ...

QuoteI've also seen that an edited file has an XMPToolkit tag added and sometimes a HistorySoftwareAgent tag.

Which way do you use for that?

exiftool -if '$xmptoolkit or $historysoftwareagent' ...

QuoteIs there also a short way here for something like this for example:
'-FileName<${XMPToolkit;s/.+/EDITED/}%f.%e'

It would be simpler to do this:

'-filename<${XMPToolkit;$_="EDITED"}%f.%e'

QuoteThis way is not correct because when I convert a NEF to a DNG I also get an XMPToolkit tag.

So don't apply this to DNG files:  --ext dng

- 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 ($).

J4c06r1nw1s

Using ExifTool v12.37 on Linux

J4c06r1nw1s

Quote
You could do this (to find files with a 3 minute difference):

exiftool -if '($datetimeoriginal or $createdate) + 180 < $modifydate' -d %s ...

This works


exiftool -if '($datetimeoriginal or $createdate) + 180 < $modifydate' -d %s -FileName .



Unfortunately, this doesn't work when I'm working with dates.


exiftool -if '($datetimeoriginal or $createdate) + 180 < $modifydate' -d %s '-TestName</test/${CreateDate#;DateFmt("%Y/%m/%d")}/test_${CreateDate;DateFmt("%Y%m%d%H%M%S")}.%e' .



Warning: Error converting date/time for 'CreateDate' - /volume1/footage/PHOTOS/image_1.jpg
Warning: No writable tags set from /volume1/footage/PHOTOS/image_1.jpg
Warning: Error converting date/time for 'CreateDate' - /volume1/footage/PHOTOS/image_2.jpg
Warning: No writable tags set from /volume1/footage/PHOTOS/image_2.jpg
Warning: Error converting date/time for 'CreateDate' - /volume1/footage/PHOTOS/image_3.jpg
Warning: No writable tags set from /volume1/footage/PHOTOS/image_3.jpg



exiftool -if '($datetimeoriginal or $createdate) + 180 < $modifydate' -d %s -r '/volume1/footage/PHOTOS' -datetimeoriginal -createdate -modifydate


All the dates are then in seconds. How can I prevent this?


======== /volume1/footage/PHOTOS/image_1.jpg
Create Date                     : -2082844800
Modify Date                     : 1348223519
======== /volume1/footage/PHOTOS/image_2.jpg
Create Date                     : -2082844800
Modify Date                     : 1348223530
======== /volume1/footage/PHOTOS/image_3.jpg
Create Date                     : -2082844800
Modify Date                     : 1348223267

Using ExifTool v12.37 on Linux

StarGeek

Remove the -d %s and add it to the -if option
-if '(${DateTimeOriginal;DateFmt("%s")} or ${Createdate;DateFmt("%s")}) + 180 < ${ModifyDate;DateFmt("%s")}'

edit: Linked wrong option
* 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).

J4c06r1nw1s

Using ExifTool v12.37 on Linux

Phil Harvey

StarGeek's technique works, but TIMTOWTDI...

Quote from: J4c06r1nw1s on January 04, 2022, 09:51:51 AM
Unfortunately, this doesn't work when I'm working with dates.


exiftool -if '($datetimeoriginal or $createdate) + 180 < $modifydate' -d %s '-TestName</test/${CreateDate#;DateFmt("%Y/%m/%d")}/test_${CreateDate;DateFmt("%Y%m%d%H%M%S")}.%e' .

You forgot to disable the print conversion for the second CreateDate (ie. add the trailing "#").


Quote
exiftool -if '($datetimeoriginal or $createdate) + 180 < $modifydate' -d %s -r '/volume1/footage/PHOTOS' -datetimeoriginal -createdate -modifydate


All the dates are then in seconds. How can I prevent this?

exiftool -if '($datetimeoriginal or $createdate) + 180 < $modifydate' -d %s -r '/volume1/footage/PHOTOS' -datetimeoriginal# -createdate# -modifydate#

- 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 ($).

J4c06r1nw1s

Using ExifTool v12.37 on Linux