1

In Linux, how can I recursively copy files and directories in such a way that all of the copied files and directories will have a name that windows can handle?

I want to copy a folder into a shared directory or USB device that uses Windows file name restrictions, without failing or losing any files/folders (prefer to change name rather than to lose data).

1 Answers1

0

Some ideas from the post copy filenames with special characters to an external ntfs volume:

  • Use detox to clean up special characters in filenames.

  • Mount the NTFS filesystem so it cleans up (sanitizes) the file names by itself. The mount option to enable this is windows_names. See man ntfs-3g.

  • Use rsync to change filenames to fit the destination filesystem with the parameter --iconv=CONVERT_SPEC, to request charset conversion of filenames.

harrymc
  • 498,455