Your script can do an unmount when it is done, or you can unmount the disk with a User Script on a cron. Go to the UD page and click on the help icon and read about using the UD script to mount and unmount the disk. The problem with the cron is that you'd also need to confirm it got unmounted or you'll be back in the same pickle.
My suggestion is to set up a User Script to do the copying and unmount the disk at the end of the script. As I read your post, it is a manual process.