There needs to be an exception that gets raised when there is a failure while transfering the files to the client (destination). So that would be like
try {
} catch (Exception er) {
}
This is a general case, where you attempt to do something, if error triggers, you delete (cancel, roll back) any changes that you've made on the clients computer. It is similar to a copy/paste function, upon Cancel click, the changes are removed and the computer is back in its initial stage.
Edit
While I was offline, I was thinking about a better solution for this problem. Which is, you can transfer the files over the internet connection and log each file that was transferred and the delivery report for it (either successfull or failure). Once you do this, you will be able to capture the details and resend the file that had a trouble. Because deleting the entire file set that was sent successfully and retrying to send the files to the client is not a good way. Just resend that one file.
Somehow you're still interested in the FileSystem transaction kind of thing, you can have a read at the Windows'
Transactional NTFS[
^]. Or read this
MSDN magazine[
^]. Or a simple Windows developer documentation for using
Transactional NTFS[
^]. Also note that there is a
Transactional File Manager[
^] available for you to use.
Good luck. :-)