Dolphin replace/remove invalid chars in filename when copying to NTFS?
clarjon1
info at clarjon1.com
Thu Jan 5 19:18:19 GMT 2023
Having just an automated autoreplace could result in poor results, esp
if not explained to the user...
I wonder if functionality could be done to check what the destination
filesystem is,and a quick scan of the file names to look for
incompatible characters, then provide a dialog with functionality like
"Some files contain characters not allowed by the destination file
system (FilesystemTypeHere) and cannot be copied as-is. Manually
rename the files below, click to allow auto-replacement of characters,
or continue operation without those files
| /home/clarjon1/BoxOfFilesWithInCompatibleNames
| /home/clarjon1/ThatAllowForTheTextToBeCopied
| /home/clarjon1/SoUsersCanManuallyReplace
| /home/clarjon1/AtTheirDiscretion
[Autoreplace] [Ignore Files] [Cancel]
If Autoreplace is chosen, a second dialog should appear, that will
show the results, so users can note/document what the new file names
are, which may be important eg for updating scripts.
On Thu, 5 Jan 2023 at 08:06, Alexander Puchmayr
<alexander.puchmayr at linznet.at> 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.
>
> Alex
>
>
>
>
More information about the kde
mailing list