Rewrite copy command.