Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Windows forbidden characters in file names on NTFS

  1. #1
    Join Date
    Feb 2010
    Location
    nh,usa
    Posts
    154

    Default Windows forbidden characters in file names on NTFS

    I'm using a USB external harddisk with NTFS as my backup for several OpenSuse and Wiindows machines.

    The problem is with file names, an example being a filename containing "|", and using windows to access an OpenSuse written file or directory.

    OpenSuse writes and reads the files as they are, while windows chokes on names with forbidden characters, you can't even delete them.

    Any suggestions how to handle this?
    Regards,

    RIH5342

  2. #2

    Default Re: Windows forbidden characters in file names on NTFS

    rih5342 wrote:
    > I'm using a USB external harddisk with NTFS as my backup for several
    > OpenSuse and Wiindows machines.
    >
    > The problem is with file names, an example being a filename containing
    > "|", and using windows to access an OpenSuse written file or directory.
    >
    > OpenSuse writes and reads the files as they are, while windows chokes
    > on names with forbidden characters, you can't even delete them.
    >
    > Any suggestions how to handle this?


    Get another disk and format it with a Linux filesystem

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: Windows forbidden characters in file names on NTFS

    Quote Originally Posted by djh-novell View Post
    Get another disk and format it with a Linux filesystem
    +1
    By backing up to a non-Linux file system, you not only have that file name problem, but you also loose most of the meta-data that belongs to the file like owner, group, permission bits.

    My advice is to use non-Linux file systems only for direct exchance with non-Linux systems (in that case you have to handle those incompatablities anyhow, in one or the other direction). But never use it for all Linux situations (like backups, I bet that in case of a disaster you want to restore things as they were when you made the backup).

    (BTW it is not needed to get another disk I guess, creating an ext4 fs on that very disk is also an option when nothing important is on it yet).
    Henk van Velden

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,193
    Blog Entries
    3

    Default Re: Windows forbidden characters in file names on NTFS

    Quote Originally Posted by rih5342 View Post
    I'm using a USB external harddisk with NTFS as my backup for several OpenSuse and Wiindows machines.
    I do that too.

    You run into filename problems if you backup with direct copying. If you use some kind of archive then you only need to be careful about the name of the archive. So use "zip" or "tar" or "dar" or similar.

    I am currently using "dar" to backup linux, and Acronis True Image to backup Windows.
    openSUSE Leap 15.1; KDE Plasma 5;

  5. #5
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Windows forbidden characters in file names on NTFS

    Quote Originally Posted by rih5342 View Post
    I'm using a USB external harddisk with NTFS as my backup for several OpenSuse and Wiindows machines.

    The problem is with file names, an example being a filename containing "|", and using windows to access an OpenSuse written file or directory.

    OpenSuse writes and reads the files as they are, while windows chokes on names with forbidden characters, you can't even delete them.

    Any suggestions how to handle this?
    You can create a permanent map for your External hard drive in your /etc/fstab file by editing the file manually as root or using the YaST / System / Partitioner where you elect to only mount and to not format the drive. You can the add in the option called "windows_names" which would prevent file names not supported by Windows being used. Here is an Example of such a mount:

    Code:
    /dev/disk/by-id/usb-ST32000641AS_9WM0BWE8-part2                    /Windows             ntfs-3g    defaults,windows_names,nofail,noatime                                        0 0
    The name of your drive would be different. I am using the folder name /Windows to mount the drive. When mounting an external hard drive do not use the default mount folders for this mount but use something different and from the root generally. For editing files as root, have a look at this utility.

    SYSEdit - System File Editor - Blogs - openSUSE Forums

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,836
    Blog Entries
    2

    Default Re: Windows forbidden characters in file names on NTFS

    Depends on what you mean by "backup."
    If you're simply copying files, then you'll have that problem.

    If you use a proper backup program that supports and understands Windows file names, then it shouldn't be an issue since the individual files are compressed into a single file which could be named anything and therefor comply with NTFS restrictions.

    So, the most simple example could be to grab a bunch of files you want and ZIP or RAR them into a single file on the target destination.
    Restoring would be simple, unzip or unrar (extract) files to the chosen (perhaps original) location.

    HTH,
    TSU

  7. #7

    Default Re: Windows forbidden characters in file names on NTFS

    i find that using 7z as a back up archive works VERY well
    ARC will even list the folder structure and allow you to extract only one file if that is all you need .

    it also supports encryption and passwords

    so if all your backup's are archived BEFORE moving them to the NTFS drive , there should not be problems.
    UNLESS there are non std characters in the archive name .Then use the above mentioned fstab mount option to prevent that .



  8. #8
    Join Date
    Feb 2010
    Location
    nh,usa
    Posts
    154

    Default Re: Windows forbidden characters in file names on NTFS

    Great comments, thank you.
    Regards,

    RIH5342

  9. #9
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Windows forbidden characters in file names on NTFS

    Quote Originally Posted by rih5342 View Post
    Great comments, thank you.
    You are welcome for the help. If you elect to use any advice here, you might come back and tell us what it was and if it helped. It can be helpful for anyone else reading this message with the same issue. If you need further help, just let us know and good luck.

    Thank You for using openSUSE,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  10. #10
    Join Date
    Feb 2010
    Location
    nh,usa
    Posts
    154

    Default Re: Windows forbidden characters in file names on NTFS

    This is what I did.

    0. My "backup" is a simple copy and paste.
    1. In the OpenSuse directory, I did a search for the forbidden characters, then deleted the forbidden characters, using rename.
    2. Looking to the future, with the external-USB drive mounted, I tried to use YAST/System/Partition, and add "windows-names" to the option window which was greyed out and un-editable.
    Considering the "Use-Extreme-Caution" warning accompanying the YAST/System/Partition program, I chose to abort.

    Thank you.
    Regards,

    RIH5342

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •