Need help with script to copy files from hfs+ (read-only) to ntfs (some chars not allowed)...
by wallphoenix from LinuxQuestions.org on (#524QB)
I have some recovered files on an hfs+ drive (which is journaled, so I can only mount it read-only), that I need to copy to an ntfs drive so they can be accessed from a friend's windows machine. Unfortunately, there are a number of files with characters in the filenames that are allowed in hfs+, but not windows, so I need to batch rename them before they can be written to the ntfs drive, but without writing on the read-only drive.
My current thought is to use rename's -n option, which prints a list of files that will be renamed to stdout, and use that list with copy to change the name of each of those files.
Can someone help me out with what commands might be needed to send info from that list to copy for the right file in each case? Or is there a better/safer way to do this?
Thanks!


My current thought is to use rename's -n option, which prints a list of files that will be renamed to stdout, and use that list with copy to change the name of each of those files.
Can someone help me out with what commands might be needed to send info from that list to copy for the right file in each case? Or is there a better/safer way to do this?
Thanks!