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).
Some ideas from the post
copy filenames with special characters to an external ntfs volume:
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
See man ntfs-3g.
to change filenames to fit the destination filesystem with the parameter
--iconv=CONVERT_SPEC, to request charset conversion of filenames.