ExifTool Forum

ExifTool => Newbies => Topic started by: dmcnaugh15 on June 05, 2025, 08:11:17 AM

Title: Errors moving photos - missing tags
Post by: dmcnaugh15 on June 05, 2025, 08:11:17 AM
A lot of my photos are not moving and I get an error saying there are no writable tags.  I found this (https://exiftool.org/forum/index.php?topic=16362.0) topic indicating that I should add "-filename<filemodifydate" to my script.  But, I'm not sure where to insert it.  Below is my existing script:

exiftool -echo "Renaming files" -d "%Y/%Y_%m/%Y_%m_%d" -r -v -api QuickTimeUTC "-directory<\\DAMDAS\McN-Central\Pictures\Current\McN_Media\Photos\qPhoto camera uploads\Test_move/$CreateDate" "\\DAMDAS\McN-Central\Pictures\Current\McN_Media\Photos\qPhoto camera uploads\Alex"

Can anyone tell me where I should insert the filemodifydate part into my script?
Title: Re: Errors moving photos - missing tags
Post by: Phil Harvey on June 05, 2025, 01:55:52 PM
You get that error if CreateDate doesn't exist.  The command you are looking for is:

exiftool -echo "Renaming files" -d "%Y/%Y_%m/%Y_%m_%d" -r -v -api QuickTimeUTC "-directory<\\DAMDAS\McN-Central\Pictures\Current\McN_Media\Photos\qPhoto camera uploads\Test_move/$FileModifyDate" "-directory<\\DAMDAS\McN-Central\Pictures\Current\McN_Media\Photos\qPhoto camera uploads\Test_move/$CreateDate" "\\DAMDAS\McN-Central\Pictures\Current\McN_Media\Photos\qPhoto camera uploads\Alex"

Which will use FileModifyDate instead if CreateDate doesn't exist.

- Phil
Title: Re: Errors moving photos - missing tags
Post by: dmcnaugh15 on June 05, 2025, 06:07:03 PM
That worked.  Thank you so much, Phil!
Title: Re: Errors moving photos - missing tags
Post by: dmcnaugh15 on June 05, 2025, 06:29:43 PM
I just noticed an odd behavior.  When I use copy (not move) from the NAS location to a desktop folder, it creates the correct folder dates and puts the photos in.  But, then if I manually move (or copy) those photos back to the same NAS location and repeat the copy process, it puts them in a folder with today's date. 

You may ask, why on earth would you do that.  The answer is that I always do a test copy to the desktop first, just to make sure everything looks good.  If it does, then I do a final move to the desired destination.

Can you think of any reason this would happen?
Title: Re: Errors moving photos - missing tags
Post by: Phil Harvey on June 06, 2025, 11:10:34 AM
If you copy the file then the filesystem date/times for the new file are set to the current date/time.  Add the -P option to preserve the filesystem date/times of the original file.

- Phil
Title: Re: Errors moving photos - missing tags
Post by: StarGeek on June 06, 2025, 11:55:02 AM
The file system time stamps are fragile. One option would be to copy them into the file so they aren't lost.
exiftool -wm cg "-AllDates<FileModifyDate" /path/to/files/

This will copy the FileModifyDate into the file only for files that don't already have a CreateDate (and a couple other tags).