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.
- Code: Select all
c:\tmp> dir > \\?\c:\tmp\dotdot.
That creates a file name, dotdot. (with a literal dot at the end).
- Code: Select all
c:\tmp> 7-zip a X.7z -sdel
That creates an archive, X.7z containing the specified files within.
(In this case, simply defaulting to all files that happen to be there [& subdirectories too - SO BE CAREFUL].)
Once the files are archived, the -sdel switch kicks in & deletes said files.
(I'm not really familiar with with -sdel. Other archives use the m command, i.e., move, to accomplish similar.
ARJ, an old archiver, cannot deal with dotdot. Instead, saying, "Can't open dotdot."
ARJ m X.arj *
[ARJ, can also immediately upon creation, test an archive to assure it's validity, & if it fails the operation is aborted:
ARJ m X.arj * -jt, fails - because of dotdot., & so the archive is not created, & no files are deleted.
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?)
RAR stores the file name, dotdot. literally within its archive.
On extraction, where 7-zip replaces the . with _, looks like RAR simply drops the (dot).
Not sure how either play with truly illegal characters (cause I have none to play with)?