Change "12 34 56" to "123456"

Bulk Rename Utility How-To's

Change "12 34 56" to "123456"

Postby DavidA » Thu Jul 25, 2024 5:19 pm

How do I change tile names of files with spaces between numbers ("12 34 56" or "12 3456") to file names with no spaces between numbers ("123456")? And vice versa.

The numbers will not be sequential. Here are some actual file names that I will be working with:

03 54 13 Gypsum Cement Underlayment
07 21 00 Thermal Insulation
08 14 16 Flush Wood Doors
09 72 00 Wall Coverings

Thanks,
DavidA
 
Posts: 1
Joined: Thu Jul 25, 2024 5:10 pm

Remove spaces with digit on both sides

Postby Luuk » Thu Jul 25, 2024 7:33 pm

With RegEx(1) having a checkmark for "v2", the "Match" could be something like... (?<=\d) (?=\d)/g
12 34 56 text ------> 123456 text
12 3 4 56 7 text ---> 1234567 text
1 2 3 4 5 6 7 8 9 ---> 123456789
Luuk
 
Posts: 811
Joined: Fri Feb 21, 2020 10:58 pm

Re: Change "12 34 56" to "123456"

Postby Admin » Fri Jul 26, 2024 8:15 am

In the new version 3.5, also possible to Segment 1 to 8 and remove spaces (for the name examples given)
Admin
Site Admin
 
Posts: 2926
Joined: Tue Mar 08, 2005 8:39 pm

Re: Change "12 34 56" to "123456"

Postby therube » Fri Jul 26, 2024 4:09 pm

(Took me some time [to find it], & then it was like, oh...)


Set, 'Name Segment': 0 to 8

3:Replace
Code: Select all
Replace: <sp>
With: <nul>

(<sp> is a physical space, nul is nothing)
therube
 
Posts: 1430
Joined: Mon Jan 18, 2016 6:23 pm


Return to How-To