Exiftool, MacOS, QNAP

Started by Iain-F, July 01, 2019, 06:57:09 PM

Previous topic - Next topic

Iain-F

Hi

using Exiftool to alter photo import dates to EXIF dates with exiftool '-filemodifydate<datetimeoriginal' . Photos are stored on a QNAP NAS.

Though Exiftool reports "1 image files updated" (when I run a test) the file creation/modified date isn't changed

I know that Exiftool is working because if I transfer the file to my Mac and run the same command the creation/modified date is changed no problem.

I'm running MacOS Mojave 10.14.5, Exiftool 11.5.3 (I think, I downloaded it today) and QNAP NAS  QTS 4.3.6 (9079 I think).

I'm guessing there may be a permission problem but I'm at the edge of my capabilities/understanding.

I've checked in the NAS file management application and the file dates definitely haven't changed...

If necessary I can just transfer all the camera images to my Mac, change the dates and then transfer them back but I'd like to sort this out (and it sounds as if there have been similar issues in the past)

Thanks for any help.

Cheers

Iain

Phil Harvey

Hi Iain,

Can you use the "touch" command to set the file modification date on one of these files?

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

Iain-F

Hi Phil,
Thanks for the reply
I'd need to research how to do this.
I'll get back to you.
cheers
Iain

Iain-F

Hi Phil
Yes I can. I tried both in the top level of the shared folder on the NAS and in the original location.
Both files had dates reset immediately to today's date/time
Cheers
Iain

Iain-F

Well, this is bizarre.
I had to restart my Mac and then tried again with a single image on the NAS.
Exiftool worked fine.
Tried again with a small batch of images, no go.
Tried again with a single image, no go.
I am using PathFinder as a Finder substitute but not sure if this is relevant...
Cheers
Iain

Iain-F

Tried restarting, quitting PathFinder, used exiftool with Finder. No go (i.e. dates not changed despite exiftool reporting files updated). Terminal output below

Iains-Mac-mini-2:~ iainfarquhar$ exiftool "-filemodifydate<datetimeoriginal" /Volumes/Photosync/Note\ 9\ Photos/Samsung\ SM-N960F/Camera/20190625_193431.jpg /Volumes/Photosync/Note\ 9\ Photos/Samsung\ SM-N960F/Camera/20190625_193438.jpg /Volumes/Photosync/Note\ 9\ Photos/Samsung\ SM-N960F/Camera/20190625_193444.jpg /Volumes/Photosync/Note\ 9\ Photos/Samsung\ SM-N960F/Camera/20190625_193448.jpg /Volumes/Photosync/Note\ 9\ Photos/Samsung\ SM-N960F/Camera/20190625_193521.jpg /Volumes/Photosync/Note\ 9\ Photos/Samsung\ SM-N960F/Camera/20190625_193812.jpg /Volumes/Photosync/Note\ 9\ Photos/Samsung\ SM-N960F/Camera/20190625_193822.jpg /Volumes/Photosync/Note\ 9\ Photos/Samsung\ SM-N960F/Camera/20190611_194039.jpg
    8 image files updated

Strange

Phil Harvey

Yes.  Very odd.

I have experience some problems in the past on MacOS with ExifTool setting date/time for a batch of files.  I don't know why the inconsistencies, but as a patch ExifTool sets the time twice for each file.  This patch was applied for OS X 10.6, but I don't know if it is still necessary for more recent MacOS versions.

I suspect this is related to your problem.

Unfortunately this isn't an ExifTool problem, and I don't know what else I can do about this.  The problem likely lies somewhere in the interaction between the standard C utime function that ExifTool uses and the underlying OS.  I'm guessing that it is a subtle bug in the caching mechanism.

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

Hayo Baan

Quote from: Iain-F on July 02, 2019, 04:11:56 AM
Hi Phil
Yes I can. I tried both in the top level of the shared folder on the NAS and in the original location.
Both files had dates reset immediately to today's date/time
Cheers
Iain

That was with the touch command, right? If that's the case, there's basically nothing much Phil/exiftool can do; it's the QNAP/MacOS that's doing this. I've seen this reported more often (either here or at the PhotoMechanic forums). Perhaps the QNAP reverts back the date so e.g. backup software doesn't update an otherwise unchanged file, but I really don't know if this is indeed what's going on here. Perhaps ask the QNAP people?

BTW, are you trying to set the times to a newer or older date? Or have you already tried both? Oh, and does the date stick when the content of the file is actually changed?
Hayo Baan – Photography
Web: www.hayobaan.nl

Iain-F

Hi

and thanks all.

I can try the QNAP forums and see if I get any joy.

In the meantime I've copied the folder to my Mac and changed the dates which works fine and will maybe transfer them back. I use an Android app called Photosync to do automatic syncs from my phone to my NAS and I suspect that changing the dates will confuse this software.

I use NeoFinder for cataloguing and this will sort by EXIF date so I may just ignore the Finder/PathFinder created/modified dates.

BTW I'm getting a 'no writable tags' error when I try to do the same thing with MP4 files (on my Mac)

Cheers

Iain

Phil Harvey

MP4 files usually contain a CreateDate, not DateTimeOriginal.  So try this:

exiftool '-filemodifydate<createdate' '-filemodifydate<datetimeoriginal' DIR

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

Iain-F

Hi and thanks Phil and Hayo,

I think I've ended up going in a circle and in order not to confuse my phone's archiving software, I think I will leave everything alone!! BTW I was trying to change to an older creation/modified date...

If Photosync (on my phone) only looks at the filename (unlikely?) then there may be an option to revisit this.

In the meantime, thanks again.

Cheers

Iain