Wow, I see I'm wayy behind here.. Cant remember the last time I saw a post this active.
Cant wait to see what-all we manage to come up with, lol.
TherubeThanks for the tip about: MD \\?\C:\DirPath\.. Now I can quickly make 10 BadFolderNames:
For /L %A IN (1,1,10) DO @MD "\\?\C:\DirPath\BadName%A "
Works like a charm.. Thanks again!
Trm2If you come across anything
safe, that can create illegal-names on a Windows machine, please let me know.
I mean besides the 'illegal' trailing-space situation that Therube has already solved.
I'm done with hex-editors at this point, & I'm beginning to think the only answer is another drive.
Hope I'm wrong about that, but I need to create a good Windows test-environment.
I was able to create many files on the ftp server with characters like <|?*>.
But as suspected, Windows wouldnt allow FileZilla to transfer them like that.
I see you've been researching out there, so if you come across anything, please let me know.
So far, even apps with their own built-in file-handlers cant do it
(within a running Windows environment).
Guess I'm a glutton for punishment, lol..
CliffyBoyFor quick reference, here's a link to the post:
http://www.bulkrenameutility.co.uk/foru ... 826#p12890Its not just for you, I need it too.. I have very old eyes, and its easy to get lost here on the forums.
But before you look at it, please note that Windows wont
let BRU touch
any illegals.
I should say, that since BRU uses a WindowsAPI for file-handling, it cant
access the file, to rename/delete it.
Only apps with their own
built-in file-handlers could access those files properly.
Technically, folder-names ending in space shouldn't be illegal, but the API certainly hates them.
That being said:
Once you manage to kill all of the illegal character situations.
This removes leading/trailing spaces from filenames, and
leading spaces from folder-names:
#1Regex Match/Replace:
^ *(.*?)[ ]*$
\1
IF you're still trying to fix folder-names with trailing spaces, BRU simply cant touch them with a Window's API.
Otherwise, the regex works as described. I just used it to recursively list & remove leading/trailing spaces.
Maybe its because no files are selected in the right-pane??
By default, BRU wont auto-select anything.. You have to do it manually in the right pane.
But you can change that setting at: DisplayOptions / List / Auto-SelectEntries (v3.0.0.1).
With newer versions, its something like: Actions / List / Auto-Select.
And yes, you're correct.. Any file-operation whatsover causes the API to remove leading spaces.
But there's
another API that controls the
listing (not
accessing) of file/folder-names.
That's why regex can
list such file/folders, but not
access them (rename/delete/move/etc).
The reason why 'examplefile .txt' is allowed, is because technically, it doesnt end with a space.
If you removed that extension, the API would indeed treat it, just like it treats: 'FolderName '.
How did you generate: 'no selected items'? My version doesnt have that preview-button/function?
I couldnt find it anyways, I mostly rename with an older portable version, so I'm not used to it..
Anywho, I'll wait to hear back from you on this, I still havent done any testing.. Been kinda busy.
Thanks to you/Therube, I've got some theories on how to fix such folder-names
within Windows.
If that's still an issue; please let us know.. Just give me some time for testing..
And thanks for the ftp, too.. Nice app btw.
Cheers to all!