
I see there has been much discussion about this. Looking forward to hearing CliffyBoy to see whether there was a replacement, or just removal.Ĭheers! RegexNinja Posts: 134 Joined: Fri 5:26 pm I'm now wondering what the differences might be between the different archivers out there.

I dont suppose 7zip has an option to choose whether _ is used as the replacement? Windows would still disable creating files with illegal-chars, but at least we could fix them.
#Mass rename in a rar file code
I've no idea how hard it'd be to code your own file-handler though, but it'd be a great option! The archivers have their own built-in file-handlers, so they dont rely on the Windows API's. So that during extraction, there's no worry about anything going to a wrong location.
#Mass rename in a rar file full
I do know, that when placing them into an archive, there's a 'copy full path' option. Since it would take the same file-handing ability to perform either of those actions.īut its easier to place them all into 1-archive (with the delete option), then extract-all, versus renaming 1-by-1. I'm fairly certain that most archivers can either rename or delete such files. Hopefully, CliffyBoy will post back to verify this.
#Mass rename in a rar file how to
Seems RAR doesn't know what to do with it, so not sure how it deals with things.Īlso don't know how to create an illegally named file to see how the archives deal with adding it to their archive ?) therube Posts: 1100 Joined: Mon 6:23 pm 09:32 AM 462 FilenameWithIlligalCharacters_.rtfĭirectory of C:\TMP\SEA\xul\cache2\dotdot\x\y\SomeFolder\ 462 4096 SomeFolder\SubFolder\FilenameWithIlligalCharacters_|_"*?.rtfĬode: Select all Directory of C:\TMP\SEA\xul\cache2\dotdot\x\yĭirectory of C:\TMP\SEA\xul\cache2\dotdot\x\y\SomeFolderĭirectory of C:\TMP\SEA\xul\cache2\dotdot\x\y\SomeFolder\.HFS+ Private Directory Data_ĭirectory of C:\TMP\SEA\xul\cache2\dotdot\x\y\SomeFolder\SubFolder 462 4096 SomeFolder\SubFolder\FilenameWithIlligalCharacters1_2|3_46"7*8?9.rtf Path = Example (containing file names with ILLEGAL characters).dmg Listing archive: Example (containing file names with ILLEGAL characters).dmg So 7-zip, on extraction, replaces illegal characters with underscores.Ĭode: Select all 7-Zip 19.00 (x86) : Copyright (c) 1999-2018 Igor Pavlov : Not sure how either play with truly illegal characters (cause I have none to play with)? therube Posts: 1100 Joined: Mon 6:23 pm with _, looks like RAR simply drops the (dot).

I don't know how 7-zip's -sdel or RAR's m options deal with errors & what might or might not happen as far as archive creation, file deletion are concerned?) [ARJ, can also immediately upon creation, test an archive to assure it's validity, & if it fails the operation is aborted:ĪRJ m X.arj * -jt, fails - because of dotdot., & so the archive is not created, & no files are deleted. Other archives use the m command, i.e., move, to accomplish similar.ĪRJ, an old archiver, cannot deal with dotdot. (I'm not really familiar with with -sdel.

Once the files are archived, the -sdel switch kicks in & deletes said files. (In this case, simply defaulting to all files that happen to be there. That creates an archive, X.7z containing the specified files within. (with a literal dot at the end).Ĭode: Select all c:\tmp> 7-zip a X.7z -sdel

In the case of 7-zip, in the case of a filename that ends with a (dot) (., period) - which is not an "illegal" character, not an "illegal" filename, then yes it will delete the file after "moving" the file into the archive.Ĭode: Select all c:\tmp> dir > \\?\c:\tmp\dotdot.
