ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: dsmphotofriend on January 04, 2020, 04:56:48 PM

Title: Auto sorting of photos on Synology station - hint to exclude system folders
Post by: dsmphotofriend on January 04, 2020, 04:56:48 PM
Hi all,

I am extremely happy about exiftool and use it to sort pictures on a Synology Diskstation with a periodic cron job.

It runs this command in a little script executed by task scheduler:
exiftool '-Directory<CreateDate' -d "$targetPath/%Y/%m" "$sourcePathA"

(with various paths for inbound folders).

Today I added the "-r" option to include subdirectories:

exiftool '-Directory<CreateDate' -d "$targetPath/%Y/%m" "$sourcePathA"

Unfortunately, this started to produce errors, as it turns out the Synology software stores Thumbnails in hidden folders, as I can see in the logs:
Warning: No writable tags set from /volume1/photo/Camera Roll/2019/02/@eaDir/20190228_142414.jpg

So I now run
exiftool -if "$filename !~ /@eaDir/" '-Directory<CreateDate' -d "$targetPath/%Y/%m" "$sourcePathA"

That seems to do the trick, if there is a syntax error in the above or a better way to achieve this, let me know! Otherwise, hope that this helps someone else.

Phil, thanks for this excellent little helper - amazing work.

BTW, someone else here had a similar problem it seems, but it seems the root cause (ignoring the hidden thumbnail folders) wasn't addressed:
https://exiftool.org/forum/index.php?topic=6920.msg34716;topicseen#msg34716
Title: Re: Auto sorting of photos on Synology station - hint to exclude system folders
Post by: StarGeek on January 04, 2020, 05:06:30 PM
See the -i (Ignore) option (https://exiftool.org/exiftool_pod.html#i-DIR--ignore).

I've never used it but I think -i @eaDir would do it.  I haven't tested it though.