BRU for Unicode chars in file/folder name

Bulk Rename Utility How-To's

BRU for Unicode chars in file/folder name

Postby lvth » Sat Aug 05, 2023 8:53 pm

Hi everyone,
I'm facing a quite difficult problem: due to some user misbehaving I have a folder containing a lot of subfolders/files, with two combined problems:
- some full path is very long (>256)
- some full path contains illegal/strange chars, like UNICODE \u2764 which show as an heart (??) and many others,
The size of the problem is that I have ~6K folders and ~180K files.
I've applied the regedit hack to allow long file names.
I did some (quite deep) search, on BRU forum, and on DelinvFile and Shareprep utils, but the trial version of those did NOT solve my problem.
The only hope I have is to find a way to specify Unicode chars in BRU rules, just like in "Remove (5)" where there is an option "High", but AFAIK can handle only ANSI chars 128 to 255. I need double chars...
Is it possible? Or maybe using some regex, (where I'm not really fluent...) to replace/remove any Unicode char ?
Thans in advance if anyone could help me...
Luigi
lvth
 
Posts: 2
Joined: Sat Aug 05, 2023 8:07 pm

Remove Unicodes

Postby Luuk » Sat Aug 05, 2023 11:21 pm

RegEx(1) can match any range of characters, but no Windows application can access names with illegal characters.
To destroy all unicodes, you can put a checkmark in "v2", so then using a 'Match' like...
[^\x20-\x7F]+/g

To destroy some unicodes, like smileys/emojis/etc, the range is more like...
(\xf0.|\xe2)../g

Related post: https://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=12&t=5639#p15353
Luuk
 
Posts: 705
Joined: Fri Feb 21, 2020 10:58 pm

Re: BRU for Unicode chars in file/folder name

Postby lvth » Sun Aug 06, 2023 10:36 pm

Thanks... due to your mention of "v2" I checked for updates finding a new version of BRU, now my regex works....
Thanks a lot, again
Cheers
Luigi
lvth
 
Posts: 2
Joined: Sat Aug 05, 2023 8:07 pm


Return to How-To


cron