0

I have a drive of files recovered from a mac (hfs+) that I'm trying to copy over to an ntfs volume so that they can be accessed from a Windows machine. There are, unfortunately, quite a few files with characters that won't copy.

This is a very similar question to this one, but I've tried both mounting the ntfs volume with the windows_names option, and using rsync with the iconv option (with utf-8 and utf-8-mac in different orders, or with '.'), both without success. To my understanding, I also can't use the detox option, as I can't write to the drive with the original files (journaled hfs+ can only be mounted read-only on linux).

I'm on Ubuntu 19.04, and I've tried copying from the GUI and rsync so far.

If it helps, with the ntfs drive mounted with the 'windows_names' option, I use

sudo rsync --append-verify -r <source> <dest>

and get

rsync: open "/location/Reunion??.rtf" failed: Invalid argument (22)

from files with invalid characters.

Can I maybe pipe the files through detox somehow so that they're not writing to the original drive or the destination that won't accept the invalid characters? Do I have to change all the files manually? Is there a regex script option, maybe?

2

2 Answers 2

1

Not ideal, but I solved this by using an ext4 drive as an intermediate location. I copied the files from the hfs+ drive to an ext4, then used detox, then copied the files again over to the ntfs drive.

1

A related question solved this with a custom bash script, which basically iterates through the files and renames them on-the-fly to the destination drive, changing colon : and question-marks ? to underscores _: Rsyncing files with special characters to USB FAT32

You simply need to rename the source/destination directories in the shell script.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .