Windows Illegal Character Help

Bulk Rename Utility How-To's

Re: Windows Illegal Character Help

Postby RegexNinja » Wed May 06, 2020 3:52 pm

Admin
Thanks for clearing that up, I was wondering what happened.. No need to worry about it.
I hope there's a special place in you-know-where for spammers, they ruin so many thing for the rest of us.
I'll just be extra careful with the posting, I can be quite fumble-fingered at times.
Btw, I've been doing some research into this API-thing, and luckily I was wrong!!

It turns out that you can mod an APIs behavior, in how it treats FullPathNames passed to it.
There's a \\?\ namespace-prefix, 1st suggested by therube: http://www.bulkrenameutility.co.uk/foru ... =15#p12950
This prefix 'tells' an API not to place so many restrictions against the name that follows.

I've confirmed this prefix is also what allows \\?\VeryLongFullPathNames and \\?\UNC-Paths.
Not all API's will accept the prefix, but I'm told that all Unicode-versions do accept it.
Only thing I have not verified - Does this prefix also allow accessing files with the illegals??

At this point, I'm gonna say there's a 90% chance it does, based on the apps I've been testing.
There's a decent link at: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
Who knows, maybe not such a hard re-write after all ??

Just guessing on that part, only 'programming' I ever did was with an old Casio calculator.
Anywho, I'm glad to have learned all this stuff.. Maybe others will find it interesting too.
Cheers!
RegexNinja
 
Posts: 134
Joined: Fri Feb 21, 2020 5:26 pm

Re: Windows Illegal Character Help

Postby Admin » Thu May 07, 2020 3:46 am

Hi RegexNinja,

Renaming using \\?\ as a prefix in the renaming API is an enhancement that is high on the to do list for BRU.
This will allow handling of long file names. Not sure if it will also solve the issue with illegal characters.
Is anyone available to test with illegal characters if we create a new version of BRU using \\?\ ?

thanks
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: Windows Illegal Character Help

Postby trm2 » Thu May 07, 2020 4:19 am

Hi Admin.

If you are creating a new version - don't forget to include those other things we talked about. Also if you update the PCRE to
PCRE2 that should take care of a few issues concerning RegEx including case support and a global switch?

And those other issues as well that I talked with your management team at TGRMN including an issue with alpha padding, etc.
I don't have time to dig up old correspondence, but as issues arose I did have discussions. The one that comes to mind the most
is that Drag and drop problem. Also an issue with selecting files - have criteria set for New name, select files with Shift down
(sequential selection), then keeping shift down use the up arrow. It not only deselects the end file, but it also deselects the one
above it although it will display still highlighted. This behavior will also occur with using the CTRL mouse for deselecting files.
usually takes a couple of tries to see the issue using the Ctrl Key.

Still looking for those emails regarding that Conditionals request - withdrawn for now but I do remember discussing it somewhere.
I just can't recall where in the RegEx discussion the issue came up. It doesn't have to do with the Translation table - that was
added to address a similar feature - but I just know I saw it in relation to RegEx, or maybe that was the Global switch. That might
be it.

Any changes though that get implemented - please let me know the very details because I am the one that has to do the rewrites.
You can send them to me through my email as I do not want the back and forth of that going through the forums. The UNC you mentioned,
that will affect information in Volume II that has already been incorporated- other things will affect Volume I so please keep me
informed.

Thank you as always.
trm2
 
Posts: 156
Joined: Wed Jan 15, 2020 12:47 pm

Re: Windows Illegal Character Help

Postby Admin » Thu May 07, 2020 4:41 am

Hi tm2,

Yes, we will keep a detailed log of all changes.
Selection issue you mention is on the list, also drag and drop.
PCRE2 use will be investigated.
Also support for full paths in the rename-pairs file is being investigated.

thanks 8)
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: Windows Illegal Character Help

Postby trm2 » Thu May 07, 2020 4:52 am

Great! I forgot about that last one - that was an early discussion way back.
trm2
 
Posts: 156
Joined: Wed Jan 15, 2020 12:47 pm

Re: Windows Illegal Character Help

Postby RegexNinja » Fri Jun 05, 2020 9:23 am

Update: At risk of bricking my laptop a 2nd-time, I used a linux boot-cd to create some true illegals.
By true illegals, I mean file/folder-names with chars like |<"> in them..

So far, nothing I've tested has the ability to rename them via the \\?\TrueLongPathName (within Windows).
This includes archival apps like 7-zip and FarManager, regardless of what API's they claim to use.
Some apps use a file's short-name as a workaround, but its not \\?\ that provides the functionality.

My last post made it sound like \\?\ might make this possible, but now I seriously doubt it.
I've also not found any way to create these true illegals within Windows.
Many ppl swear they've done so, but after much testing, I have my reservations.

My logic was: If you can create them in Windows, why not also rename them?
But now, I'm not convinced they were created within Windows to begin with?
If they were, then maybe it is still possible..

For now, I'm giving up on the research, unless I find an app to create them, or rename them without short-names.
Hoping I'm wrong, but so far nothing touches the true illegals..
Cheers.
RegexNinja
 
Posts: 134
Joined: Fri Feb 21, 2020 5:26 pm

Previous

Return to How-To