Repartitioning two disks without a loss of data
Why does it have to be scripted? I'd reboot with a boot disc like RIP (rescue is possible) Linux in X, run gparted (a graphical utility), and resize the partitions from there. Gparted has the ability to resize partitions without damage (at least I've not had a problem with NTFS; haven't had to do it much at all with Linux partitions)
BUT
YOU SHOULD HAVE A BACKUP OF THE DATA
It's just plain silly if this is important data to not have backups and play with the partitions. Or downright stupid, depending on how important the data is.