Add optional suffix instead of counter

Started by fotoschubser, July 27, 2016, 04:52:13 AM

Previous topic - Next topic

fotoschubser

Dear all,

Looks like I have found my new tool for organizing my photos and videos. :-)

Is it possible to use optional suffixes instead of counters if the output file name would become a duplicate ?

What I mean is:
In general I want to rename all my photos to:

YYYYMMDD_hhmmss.EXT

But unfortunately this is unique if you have wife and kids who use the "burst mode".
So I have many photos from different cameras which shall get an additional suffix like FileNumber, SubSecTimeOriginal or FileName instead of the counter. But only in case it is required.

e.g.



P4140137.jpg > 20140414_185213.jpg

P4140138.jpg > 20140414_185236(P4140138).jpg instead of 20140414_185236.jpg
P4140139.jpg > 20140414_185236(P4140139).jpg instead of 20140414_185236-1.jpg
P4140140.jpg > 20140414_185236(P4140140).jpg instead of 20140414_185236-2.jpg
P4140141.jpg > 20140414_185236(P4140141).jpg instead of 20140414_185236-3.jpg


Is this possible ?

Kind regards
fotoschubser

Phil Harvey

I can't think of any easy way to do this.
...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

Like Phil already said, this isn't really possible. It would be possible if you'd have it always add e.g., the filenumber (then you just include it in the rename string). I use a very similar way of (uniquely) naming my files, I chose to always include the subsectime; it's just two additional digits and these do not impact e.g., sorting.

Note: even subsectime wasn't enough in my case as when shooting with multiple cameras you can still end up with duplicates. To work around this I included the camera model in the name (I don't have multiple cameras of the same model) as well.

Hayo Baan – Photography
Web: www.hayobaan.nl

fotoschubser

Phil, Hayo,

Thanks. After playing around with exiftool all day long, I will stick with the counter.
Since it has the same order as the original file names it is sufficient for my needs.

Kind regards,
fotoschubser