I have the following script that works just fine except that it can't handle duplicate file names. How can I simply amend it so that if a picture with the same name is found it simply adds an increment at the end of the file name e.g. if file IMG_20170404_170509.JPG is found twice the second instance will be rename IMG_20170404_170509_1.JPG and if another is found then it will be IMG_20170404_170509_2.JPG, etc.
Here is my current script:
exiftool -o . '-Directory<$createdate/${model;}' -d /volume1/Synology/Pictures/Pictures/post_2016/%Y/%m/ -r /volume1/photo/"input"/
Thanks
P.S. I know there is a < between -Directory and $Createdate in the above script but if I include it my message on this board is truncated (yes I know I'm a real novice at all this. Apologies).