Numbering multiple files with same date

Bulk Rename Utility How-To's

Numbering multiple files with same date

Postby msaucierbbd » Tue Jul 05, 2022 9:02 pm

Hello to you. I need help.

I love your software, very useful thank you. I have a folders containing more thab 500 photos each. I want to name the files using the YYYYMMDD format. BUT, since I have multiple photos having the same date on multiple files, 'Bulk Remane Utility' adds _1, _2, _3 at the end of the files having the same date

The problem is when I sorting the photos on my TV, it gives me the famous problem of 1,11,12....19,2,21...instead of 1,2,3,4 etc... I don't know what to do.

Any suggestion. What do I need to add as a suffixe to get something like 20220625x (where x would be 1,2,3,4,5 etc...) being correctly sorted on my TV. Or any other solution ?

Waiting for your support

Thank you again

Mario
msaucierbbd
 
Posts: 2
Joined: Tue Jul 05, 2022 8:51 pm

Padding _# into _###

Postby Luuk » Wed Jul 06, 2022 1:22 am

The setting for "Prevent Duplicates" will only conduct after all of the other settings have finished.
So there is not any settings to modify how "Prevent Duplicates" likes to append its numbers.
If its me, Im just using another rename, to then pad all of my _suffixes into 3-digits?

To pad with 3-digits, the RegEx(1) needs a checkmark for "v2", so then a "Match" and "Replace" like...
^(20\d\d[01]\d[0123]\d_)(\d+)$(?X)(?<=20\d\d[01]\d[0123]\d_)0+(?=\d{3,}$)/g
${1}0000000$2(?X)

If needing this in only 1-rename, you would have to find an application where appending the numbers, is not the very last step.
The exiftool.exe conducts this in 1-rename, but its a command-line application, so many users prefer something graphical instead.
Luuk
 
Posts: 488
Joined: Fri Feb 21, 2020 10:58 pm

Re: Numbering multiple files with same date

Postby msaucierbbd » Wed Jul 06, 2022 2:04 pm

Thank you very much for your quick response. Very appreciated. I have considered adding 3 digits at the end of my name file BUT I would prefer to add digits ONLY if it is the same file name (the same date). Let’s assume that I went to a 10 days event. My photos are named YYYYMMDD. I would prefer to add a suffixe when the date change. It works perfectly in Windows, but as I mentioned in my first post, it create a sorting problem when my files are read on my TV set. Any suggestion ?
msaucierbbd
 
Posts: 2
Joined: Tue Jul 05, 2022 8:51 pm

Padding _# into _###

Postby Luuk » Thu Jul 07, 2022 12:19 am

The RegEx(1) settings cant suffix anything, it only pads an existing suffix to 3-digits, if the filename is a date...
20220101_1 ======> 20220101_001
20220101_10 =====> 20220101_010
20220101_99 =====> 20220101_099
20220101_111 ====> (no changes, because suffix is already 3-digits)
20220101 ========> (no changes, because no suffix)
20220155_1 ======> (no changes, because not a dd)
20220101_a1 =====> (no changes, because not a valid suffix)

If instead, you might to prefer having 4-or-5 digit padding, you can always just change the 3 ===> 4-or-5 inside of the "Match".
If needing this in only 1-rename, you would have to find an application where appending the numbers, is not the very last step.
I could give exiftool.exe example, but of course, Im having no ideas which date or date-priorities, that you are talking about.
Luuk
 
Posts: 488
Joined: Fri Feb 21, 2020 10:58 pm

Re: Numbering multiple files with same date

Postby Admin » Thu Jul 07, 2022 6:02 am

Maybe you could add the date AND time to each to make it unique and sortable?
Would this be fixed, if BRU had the capability to specify a format for 'the Prevent Duplicates" function?
Admin
Site Admin
 
Posts: 2148
Joined: Tue Mar 08, 2005 8:39 pm

Re: Numbering multiple files with same date

Postby Luuk » Thu Jul 07, 2022 7:39 am

If the user doesnt already rename his files, Im thinking this problem to be easily solved by including the hour/minute!
This because it does seem very unlikely, that there will ever be more than nine-pictures inside of the same minute ??
At the exiftool forum, many users even rename with seconds/sub-seconds, in case the pictures are from "burst-mode".

But if a user only wants 'yyyymmdd', they should at least first sort their files by that date, before any renaming.
So this way, the added _# suffix wont make the filename-order different than their date-and-time order.

Im also thinking this problem to be solved if Prevent Duplicates granted a setting for 'Pad', and others might also like 'Separator' ??
But where to put these settings, except maybe inside of something like "Renaming Options, Prevent Duplicate Settings" ??
Or maybe invent a checkmark like... "Renaming Options, Prevent Duplicates with Numbering(10) settings ??
Luuk
 
Posts: 488
Joined: Fri Feb 21, 2020 10:58 pm

Re: Numbering multiple files with same date

Postby Admin » Thu Jul 07, 2022 8:19 am

We could add a 'Prevent Duplicates Format' entry in the menu....
.... and maybe it should just take the format settings if they are specified in numbering (10) as an option.
Admin
Site Admin
 
Posts: 2148
Joined: Tue Mar 08, 2005 8:39 pm

Re: Numbering multiple files with same date

Postby therube » Thu Jul 07, 2022 4:51 pm

To get around that, on the BRC end, I use /AUTONUMBER:, but set the number based on %date.

Maybe something like that could work in BRU too?
Code: Select all
BRC32.exe  /DIR:c:\tmp  /PATTERN:xxx_out.txt  /REMOVENAME  /AUTONUMBER:%date:~8,2%%date:~0,2%:1:P::10:0  /NODUP


In my particular situation, I am very unlikely to have duplicate "times", so the /NODUP has never kicked in.
I end up with file names like:
220617.1245.00.txt
220617.1248.07.txt
220617.1256.33.txt
220617.1259.52.txt
220617.1315.48.txt

220617 being YYMMDD
.####. being hour|minute
.##. being seconds, a "tie breaker", i.e. /NODUP, if you will

I am not apt to output more then 1 file within 1 second (of time).


(After writing that, here is what I was looking for, heh,) NODUP alternative.
therube
 
Posts: 1102
Joined: Mon Jan 18, 2016 6:23 pm

Re: Numbering multiple files with same date

Postby Admin » Tue Jul 19, 2022 9:35 am

Hi, latest version supports custom format for "Prevent Duplicates" function:
https://www.bulkrenameutility.co.uk/Download.php
Admin
Site Admin
 
Posts: 2148
Joined: Tue Mar 08, 2005 8:39 pm


Return to How-To