Dolphin : character not understood in folder name or file name

Hello.

I am working on a script I wrote under leap 15.3 a few month ago.
I am working on a laptop with a new 15.4 install without complementary settings

The script do backup of some configuration file from :
/home/user/.config
/home/user/.local
/etc
/root
/usr/share

The files are stored using a main folder name and one or more timestamp folder.
Example 1 : APP_1
MAIN_1=“/my_backup/path1/path2/path3”
RUN_1=“timestamp_1”
So the backup is done in
“$MAIN_1/$RUN_1”

Example 2 : APP_2 . The configuration has been backup already done twice. A third timestamp is generated
MAIN_2=“/my_backup/path4/path5”
RUN_2=“timestamp_3/timestamp_7/timestamp_8”
So the backup is done in
“$MAIN_2/$RUN_2”

My timestamps are like this : @2022-10-17@16:58:39@

A real example :
/run/media/user_install/BCK_LNX_INST_APP/G755VW/2023_03_04_14h00/500_PROJECTS/PROJECT_UPDATE_CONFIG_FILES/NEW_DATA/LEAP_15.4_VM_000-01/@2022-10-17@16:58:39@/@2023-03-04@14:33:17@/home/user_install/.config/konsolerc
Where
MAIN FOLDER = /run/media/user_install/BCK_LNX_INST_APP/G755VW/2023_03_04_14h00/500_PROJECTS/PROJECT_UPDATE_CONFIG_FILES/NEW_DATA/LEAP_15.4_VM_000-01
timestamp_1 = @2022-10-17@16:58:39@
timestamp_2 = @2023-03-04@14:33:17@

I discover the problem while I tried to copy one usb stick to another bigger one and get this error on dolphin panel

Could not make folder /run/media/user_install/BCKP_REINSTALL...IR_TO_USE_KEEP.0/@2022-11-04@18:30:00@.

And this error in notification

Moving failed 
/run/media/user_install/BCKP_REINSTALL_and_PERSO/BCKP_G755VW_LINUX_CONFIG/BACKUP_SYS/G755VW/2023_03_04_14h33/backup_sys/500_PROJECTS/PROJECT_UPDATE_CONFIG_FILES/16GB_CONFIG_VM/2022_11_09_23h08/002_BACKUP_WORK_DIR/001_WORK_DIR_TO_USE_KEEP.0/@2022-11-04@18:30:00@

Any comments are welcome

What filesystems are on the first and the second USB sticks?

1 Like

Bear in mind that FAT32 (the most likely default file system on any flash drive) has restrictions on allowable characters as well as length limitations. Here is a Microsoft article on the topic.

TL;DR: At a minimum, your inclusion of colons is the problem. There may be other issues as well.

Thanks for sharing. I was also facing the same issue.

Windows file names and path are a mess: Filename - Wikipedia / Path (computing) - Wikipedia.

With Linux anything goes:

karl@erlangen:~> ls \#\$%\&\*\"\\\:\;\?\=\|~.mp4
#$%&*"\:;?=|~.mp4
karl@erlangen:~>

http://www.mistelberger.net/%23%24%25%26*"\%3A%3B%3F%3D|~.mp4

You hit it.
The two devices was ntfs formated.

But it seems that it is possible to copy from ntfs to ext4.

Thank you every body.

1 Like

I have always tried to make sure in creating files and therefore giving out file names to keep them as “clean” as possible. I did this when I was a full-time Classic Mac OS / Mac OS X / macOS user, and I still do this now on my daily-driver tower which 90%+ of the time runs a Linux distribution. It’s a habit, and I think a healthy one.

One should always keep file naming conventions top-of-mind because it will save you grief later on.

I don’t know why any of the FAT file systems had the character restrictions they do; I can only imagine in NTFS’s case it’s just tradition or backwards compatibility or some other reason-from-laziness. As a Mac user, I always had the liberty to put into my file names any character I wanted apart from the full colon, which MFS, HFS, HFS+, and APFS have all used as part of a path statement, the same as \ is used within the Microsoft realm, or / on most (all?) Linux environment file systems.

For a time I was suggesting people with multi-platform use cases use exFAT instead of FAT32 or NTFS. However, the problem with that is there’s too many situations in which it’s simply incompatible, or that lead to unforseen consequences, like copying files onto a drive in one OS, and having none of those files or their associated disk usage visible to and reported in a different OS, and so on.

From its beginnings, MSDOS systems have used drive names such as “C:” and “A:” for disk drives. To make this work, “:” had to be excluded from filenames. Similarly, from its beginnings, commands use:

 drive:filename/options

so “/” had to be disallowed. When paths were introduced, they used “\” rather than “/” to avoid problems. And thus “\” had to be disallowed in filenames.

There are probably others. But it comes from the history of MS filesystem usage.

1 Like