Invalid Argument using ditto
I solved it, the file in question had extended metadata on it and that is what caused the problem. I attempted using the --norsrc and --noextattr flags, but this didn't work. I removed the extended metadata and it is now working without any errors. I don't know if there is a better approach, but to get rid of the metadata I did

cat backup_copies.cmd &gt; tmp
rm backup_copies.cmd
mv tmp backup_copies.cmd