I'm trying to migrate a bunch (300GB+) of files from a FAT32 drive to my freeNas ZFS filesystem but every command I throw at it (tar,pax,mv,cp) throws an 'invalid argument' when it encounters a non-ASCII filename – it's usually something that's been created under Windows and it reads something along the lines of "foo?s bar.mp3…" where the ? may have been an apostrophe or such.
Can anyone help with a few lines of code to recursively go through the directory tree and rename files to remove the offending characters.
Much appreciated.
Best Answer
Try mounting the filesystem with the iocharset option set to the encoding it uses.
From
man mount
under the "Mount options for fat" section:See also under the "Mount options for vfat" section:
and
Edit:
I'm sorry, that was Linux, this is for BSD (from
man mount_msdosfs
: