Logical Sorting for BRC?

Post any Bulk Rename Command support requirements here. Open to all registered users.

Logical Sorting for BRC?

Postby ikatzuki » Tue Jan 17, 2023 3:24 am

Heya! I've been using BRU for a bit and Logical Sorting is something I've been using every time to get the all of my files to be renamed in the correct order.

Recently decided to try switching to BRC but I have not been able to find anyway (if possible) to enable Logical Sorting? Is this option available for BRC or not?

This would be how I'd want the names to end up like

1.png -> 000001.png
2.png -> 000002.png
3.png -> 000003.png
57.png -> 000004.png
1234.png -> 000005.png
35821.png -> 000006.png

But because there's no Logical Sorting, I don't end up with this expected result. Instead I get 1234.png and 35821.png going before 57.png.

This is the current command I'm using
Code: Select all
/REMOVENAME  /AUTONUMBER:1:1:P::10:6:


Thanks!
ikatzuki
 
Posts: 1
Joined: Tue Jan 17, 2023 3:21 am

Re: Logical Sorting for BRC?

Postby therube » Tue Jan 17, 2023 8:37 pm

If the files, naturally sorted, are in a date modified order (or some other date related order),
you can use /SORTBY:M (or otherwise) which should then work.

If they are not in date modified order, & if the dates do not matter, then you can set the dates to be in date modified order.
(Nirsoft's) BulkFileChanger will do that.
Can be done via GUI or command-line.

If dates matter, but time not so much, & assuming the existing file names (1 2 3...) are in date modified order, you can leave the date itself alone, & only modify the time part.

Modified: (uncheck the Date), check the Time, Add 1 second, & enable Date/time sequence mode.
(Again, this can all be automated.)


Other then that, best I can figure, you're kind of at the mercy of "DOS", which isn't going to give you a natural sort.


Note that the BRC_manual.pdf notes /SORTDIR:, but that does not seem to actually be a valid switch, but /SORTBY: is.
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

Re: Logical Sorting for BRC?

Postby therube » Tue Jan 17, 2023 8:45 pm

C:\BRC\>BRC32.exe /PATTERN:*.png /REMOVENAME /AUTONUMBER:1:1:P::10:6: /SORTBY:M

Code: Select all
Processing Folder C:\BRC\
Filename temp.png would be renamed to 000001.png
Filename 1.png would be renamed to 000002.png
Filename 2.png would be renamed to 000003.png
Filename 3.png would be renamed to 000004.png
Filename 57.png would be renamed to 000005.png
Filename 216.png would be renamed to 000006.png
Filename 1234.png would be renamed to 000007.png
Filename 35821.png would be renamed to 000008.png

C:\BRC\>pause

(temp.png, which is actually a directory, wasn't intended to be there, but, anyhow...)
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm


Return to BRC Support


cron