File Order

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

File Order

Postby janeknits » Mon Mar 16, 2015 12:36 am

I am working on renaming large numbers of jpgs to their folder name info and I thought everything was going well. I've now realized that my file order is being rearranged and I don't know why. I have done thousands of files and luckily I noticed the problem before I did my backups but it is still going to be a giant PITA.
So can you tell me why when I am renaming files all with the same name and a standard numbered format to a new name also with standard numbers that the order of the files would change? Is there any setting that would force the order to stay the same.
janeknits
 
Posts: 3
Joined: Sun Mar 15, 2015 11:16 pm

Re: File Order

Postby bitmonger » Wed Apr 01, 2015 9:12 pm

Perhaps the display is sorting on something other than name, possibly date or time. I have seen this happen often when renaming, the newest modified date/time moves to the end of the list.
bitmonger
 
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am

Re: File Order

Postby janeknits » Fri Apr 17, 2015 10:16 pm

bitmonger wrote:Perhaps the display is sorting on something other than name, possibly date or time. I have seen this happen often when renaming, the newest modified date/time moves to the end of the list.

Thank you for trying to help. I was looking for other factors like you mentioned. I finally clued in the it was a problem was. BRU treating lone numbers as alpha/numeric digits rather than looking at it like a whole number like Windows Explorer does. If I number the original files myself I use 001, 002, 003 etc and the renaming process went perfectly. I renamed many files before I saw the ones with the problems. Several of the files I have gotten from other people are label file 1, 2, 3. etc up to double or triple digits . For a 24 page booklet the pages are being rearranged like this - 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 3, 4, 5, 6, 7, 8, 9, etc. The Logical sorting option is not solving the problem. Does anyone know a way to sort like windows default and treat single digits as whole numbers?
Any help would be greatly appreciated.
janeknits
 
Posts: 3
Joined: Sun Mar 15, 2015 11:16 pm

Re: File Order

Postby bitmonger » Wed Apr 22, 2015 9:17 am

You don't say exactly how the filenames look, i.e. are they numbers only or text and numbers?
This is why it is a good idea to give actual examples of the filenames you want to modify. If the whole filename is just the number as in your example, look at the explanation here:

http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=8&t=1482&p=4026#p4026

We will just modify the regular expression to eliminate the parentheses and that should work.

Use the RegEx section of Bulk Rename
Leave Include Ext. unchecked
RegEx (1)
Match ^(\d)$
The ^ and $ in the match mean the beginning and end of the filename respectively, which implies it will only match if the whole filename is limited to a single digit.
Replace 0\1
This will only match the single digit number filenames, and prefix them with a 0. It will not change any 2 or greater digit numbers.
Once those have been changed, if you have to make the 2 digit numbers into 3 digits , change the Match to:
Match ^(\d\d)$

And leave the Replace the same.

You can see how this type of cycle can be used sequentially to increase to any number of digits.
Note: this only works for a filename which is only a number. If there are filenames with text and numbers it will not match and you will have to modify the regex a bit, but I am going by the information you gave.

Hope this helps
Bit
bitmonger
 
Posts: 50
Joined: Sat Sep 22, 2007 5:05 am

Re: File Order

Postby Malware Watcher » Sat May 25, 2019 7:06 pm

Sorry, I'm late to the party... I was looking for an answering for something else when I came upon this.

An easier way to stop BRU from using logical naming convention is to disable it in "Display Option > Sorting" and uncheck "Logical Sorting". Ever since Windows 7 Microsoft has been using logical sorting right up to Windows 10. The author/developer is aware of the problem hence the choice of not using logical sorting was given. However, I recommends disabling logical sorting in Windows Explorer or File Explorer as well by using an registry file to force Windows to use "numerical" sorting instead. There are numerous application that utilizes Windows file naming conventions that run in the background when saving a file.
_________________________________________________________________
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStrCmpLogical"=dword:00000001
___________________________________________________________________

Copy and paste the text between the 2 lines into Notepad.exe then save the file as "Disabling Numerical Sorting.reg" or whatever you chooses. By using the quotation marks to enclose the entire filename you're forcing Notepad to save it with a .reg extension instead of the default .txt extension; otherwise, the filename you've saved would looked something like "Disabling Numerical Sorting.reg.txt". You can also change the filename manually to .reg after you've saved it as a text file by changing the extension .txt to .reg. Remember where you've saved the file, double-click on the file to merge the content with the registry by clicking on "OK" to the warning prompt twice. Restart the system, that's all.

If for any reason you wishes to re-enable logical sorting in Windows do the following:
____________________________________________________________________________________
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStrCmpLogical"=-
____________________________________________________________________________________

Just as before, copy the text between the lines into Notepad and save the file as a .reg file and merge it with the registry, restart the system. That's it, you're back to logical sorting again.
Malware Watcher
 
Posts: 1
Joined: Sat May 25, 2019 6:30 pm

Re: File Order

Postby Ivor » Sat Jul 11, 2020 7:37 pm

I have find the solution within Bulk Rename Utility.

If you have name with numbers in like I have "0040S1 - 0040S85"
normaly bulk rename utilitiy will sort it 0040S1, 0040S10, 0040S11... 0040S19, 0040S2, 0040S20... etc

To solve this problem you can go to "Display Option - Sorting - Logical Sorting" whan that Logical sorting is enable sort will be 0040S1, 0040S2... 0040S9, 0040S10... etc

Hope this will help.

Cheers,
Ivor
Ivor
 
Posts: 1
Joined: Sat Jul 11, 2020 7:27 pm


Return to BRU Support