Handle copying and renaming.