Removing non-alphabetic at beginning of filename Only

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

Removing non-alphabetic at beginning of filename Only

Postby zahrex » Sat Jun 24, 2023 1:00 pm

I have a situation where there are 100s of subfolders with many filenames that start with combinations of numbers 0-9, spaces, and hyphens followed by alphabetic character names. An Example of one is 00 - 000 - 021 - Fall Inventory 2023.doc Not all the files are that way though. Some might simply have 01 - Spring Catalog.pdf and others contain filenames that start with only alphabetic characters ex. Policy Manual.pdf

Is there a way with BRU to have it starting from the first character in the string, remove the non-alphabetic chararcters (numbers, spaces, hyphens) in the filename (for the rename) until it reaches an alphabetic character (a-z A-Z) and then nothing else? I would want, using the 01 - Spring Catalog.pdf example, to have it renamed to Spring Catalog.pdf and not SpringCatalog.pdf nor in the first example would I want the 00 - 000 - 021 - Fall Inventory 2023.doc to be renamed to FallInventory.doc instead of Fall Inventory 2023.doc

I'm also hoping to have it work on the files in every subdirectory of the parent directory I'm in and not just having to perform the operation one sub-folder at a time.
zahrex
 
Posts: 4
Joined: Wed Aug 25, 2021 12:53 am

Remove non-alphabetic at beginning

Postby Luuk » Sun Jun 25, 2023 6:46 am

If only renaming the files, then Filters(12) should only have checkmarks inside for "Subfolders" and "Files".
Then RegEx(1) needs a checkmark for "v2", but the "Match" will depend on which characters to destroy?

To destroy 1-or-more hyphens, spaces, and digits from the beginning, it can be like.... ^[- \d]+
To destroy 1-or-more of anything that's not a-zA-Z from the beginning, it can be like... ^[^a-zA-Z]+
To destroy 1-or-more exact strings like "digits - " from the beginning, its more like..... ^(\d+ - )+
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Removing non-alphabetic at beginning of filename Only

Postby zahrex » Sun Jun 25, 2023 8:31 pm

Thank you very much! The first of the methods you listed worked perfectly :)
zahrex
 
Posts: 4
Joined: Wed Aug 25, 2021 12:53 am


Return to BRU Support