Dolphin replace/remove invalid chars in filename when copying to NTFS?
alexander.puchmayr at linznet.at
Thu Jan 5 13:05:53 GMT 2023
Am Donnerstag, 5. Jänner 2023, 12:38:50 CET schrieb René J.V. Bertin:
> On Thursday January 05 2023 09:29:43 Alexander Puchmayr wrote:
> >I just wanted to copy a bunch of files containing various characters like
> >'?' and ':' in their names to an NTFS drive with dolphin, and got lots of
> >errors because of that names. Dolphin does not remove those characters (or
> >offer to do so), the only option you have is abort.
> >Of course, one could do that in a shell using pattern replacement, but the
> >average user, who is not familiar with those bash/aws/sed tricks, will
> >prefer a more convenient way. So is there a way of doing that in Dolphin?
> AFAIK this was always handled at the filesystem driver level, possibly with
> some kind of mapping trick that would allow the user to see the original
> filename from the Unix side.
Obviously, filesystem driver layer does not care about this, it returns an
"invalid argument" if you try to create a file containing a '?' on an ntfs
filesystem. And Dolphin simply seems to forward that error to the UI.
> But there's also something to say for disallowing this altogether; it's good
> practice to use file names that are valid on all the (file)systems you want
> to use them with...
I don't agree, especially if you do not know in advance that the files on some
filesystem should be ever moved to another file system with different naming
rules. Unix/Linux allows almost all characters, while other OS do not. Other
file systems may have problems with UTF8, so with that argumentations, we
should use DOS compatible 8.3 naming schemes, 7-Bit ASCII only, just do be
IMHO, a GUI based user program should be able to handle such cases, as most
users do not care about such restrictions and assume its OK when their primary
OS accepts it.
More information about the kde