1

I cannot copy a lot of files to my external drive because when I try to do it I get the error "wrong file name". I have seen that these files have special characters and I would like to know how to deal with this issue. Is it a problem related to special characters? I have a lot of files in the folder, so I don't want to rename them all. I am using the GUI.

2
  • I would say that the problem might be related to the file system that you have on the external drive. Different file systems have different special characters and support for international characters in the filenames.
    – nobody
    Feb 3, 2016 at 12:42
  • so if my hard drive is formatted in NTFS, it cannot accept these files? It is a matter of only 6 files among more than a hundred. What is strange is that I can open them from with the computer but the files is not copied into the hard drive.
    – Marco
    Feb 3, 2016 at 13:18

1 Answer 1

3

This isn't an Ubuntu problem but a Microsoft problem. As you said, your external hard drive is formatted with NTFS which means that you're not as free to choose your file names as you are when using ext.

You can't use any of these characters in file names when using NTFS: U+0000 (NUL) / (slash) : (colon) * (asterisk) ? (Question mark) " (quote) < (less than) > (greater than) and | (pipe).

If you want to view your files on Windows (which is the only reason to use NTFS), Microsoft restricts you even further: You cannot use the backslash (\) and certain words.

Furthermore, you might run into trouble if you use long path names. With ext, pathnames can be as long as you wish, but Microsoft limits path length.

You can solve this problem (actually you avoid it) by formatting the partition on you external hard drive with ext4. GParted can do this.

sudo apt-get install gparted

Please note that formatting a partition will make the data previously stored on this partition inaccessible.

If you merely want to transport the files between 2 machines which are capable of properly handling filenames, tar these files and give the tar ball a name acceptable for NTFS.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .