I want to copy a large number of files to a USB drive that is formatted FAT32 (and cannot be formatted anything else, unfortunately).
Many of these files have names with characters such as :
and ?
that FAT32 does not allow. Trying to use cp
or rsync
, these files are not copied and an error is reported stating so.
I do not want to rename the files at the source, but I also do not care what the files are renamed to on the destination USB drive.
Clarification on the purpose (applies to the other comments as well): This is for an mp3 player in a car and the software only allows FAT32. So it's not for backup purposes. And the reasons the filenames have strange characters is because they are, e.g. titles of mp3s, or names of artists.
I have tried a couple of things:
- rsync's
--iconv
option. This didn't seem to work but perhaps I didn't use it correctly. rdiff-backup
, which I read does this conversion by default. However, the source files are symbolic links that I want followed (i.e. rsync's-L
option), and from the manpages it doesn't seem thatrdiff-backup
has this option.
Any other suggestions?
rsync
's--iconv
option is not made for what you're trying to use it for. – depquid Apr 01 '13 at 16:56--iconv
does character set conversions, e.g., latin1<->utf8. Not what you're looking for. – derobert Apr 01 '13 at 17:49