I currently have a exiftool oneliner that moves photos from an ingest folder in to a year/month/day which works great
exiftool -r '-filename<./$createdate' -d "%Y/%m_%b/%Y_%m_%d_%Hh%Mm%
Ss%-02.c.%%e" .
But I'm now looking to expand it to do something a bit different. I'm wanting to sync photos from android phones. But store them on the server in the year/month/day format above. My idea is to sync a directory to an SMB share on the server and use exiftool to move the images to the year/month/day structure whilst leaving a symlink behind pointing to the new file. This is working from the android side as it just sees the files and syncs/deletes what it need to do. I was going to bash script it, but I've managed to get it nearly all in one line
exiftool -v IMG_20221118_150716.jpg '-filename<./$createdate' -d "%Y/%m_%b/%Y_%m_%d_%Hh%Mm%Ss%-02.c.%%e" | sed -n 3p | cut -d"'" -f 2,4 --output-delimiter=' ' | xargs -l bash -c 'ln -s $0 $1'
I just didn't want to search for each non symlink file then loop over the list calling exiftool each time. Unless I'm missing something with bash scripting. Is there any way to make exiftool ignore a symlink file so I can run this on a directory?
See the -i (Ignore) option (https://exiftool.org/exiftool_pod.html#i-DIR--ignore).
The -I option look like it only works on symlink directory's, does it work on files as well?
Ah, yes, you are correct.
Try
-if '$FileAttributes!~/Symbolic Link/'
If there are a lot of symlinks in the directory, using -if5 instead of -if should speed things up a lot.
- Phil