This script is pretty simple and is used to handle the management of captured images. This makes the assumption that the name of the captured WIM file is the same as the name of the OS folder in which it goes.
The script will, be default, make a backup of the existing WIM in the destination folder (rename it to its date/time) before moving over the new version. This allows you to go and easily revert back to a previous capture. You should, periodically, go around and clean up old backups, however.