Dolphin replace/remove invalid chars in filename when copying to NTFS?
J Leslie Turriff
jlturriff at mail.com
Thu Jan 5 22:24:10 GMT 2023
On 2023-01-05 07:05:53 Alexander Puchmayr wrote:
> 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:
> > >Hi,
> > >
> > >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 sure.
> 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.
For flexibility the tool should provide the capability for the user to create or modify a
default mapping for the objectionable characters, e.g. ? = x, : = y, ..., either on the
first use of the tool or each time it is used (when the initial mapping would be the
Distribution: openSUSE Leap 15.4 (x86_64)
More information about the kde