
-----Original Message----- From: luv-main-bounces@luv.asn.au [mailto:luv-main-bounces@luv.asn.au] On Behalf Of Daniel Jitnah Sent: Friday, 18 July 2014 8:59 PM To: Luv Main Subject: Re: Unable to remove file
Unfortunately that doesn't work either.
"File Name", "File_Name", and "File-Name" (sans quotes) are all valid file names under Windows. So if Samba or NFS et al replace the space with another character, you would need a plethora of characters to replace the evil spaces, slashes, backslashes, dashes etc. along with a way of reversing the process to return the original filename back to the originating platform.
Consider the following translations with character substitution
active:
Windows -> Samba -> Windows
File Name -> File_Name -> File Name (Desired result)
File_Name -> File_Name -> File Name (Borked result)
You could have instead
File_Name -> File__Name -> File_name
(ie: 2 underscores in Samba in case that was not obvious on the screen. Admittedly it's ugly!)
Still doesn't work, as File__Name could also be a valid file on bot Windows and Samba. So if you had files with the names: "File Name" "File_Name" "File__Name" then the substitution would not only give back the wrong filename, the files would end up overwriting one another, as one translation collides with the next. All your solution would do is to move the problem, not eliminate it. Also, the underscore is only one of the characters that would need to be catered for. In other words, there is no robust way to assure that mistranslation can't occur for all of the possible inputs, or their reversion back to the original name on the original platform.
Daniel.
Morrie.