Copy File and Log
Posted on 2013-01-16
I want to create a script that will copy one file from one fixed location on my computer to a fixed location on a share drive. The file will exist on the share drive, so I will overwrite it.
Once the copy has finished, I want to write to the event log the status. The copy could fail if the source file is locked by another applicaion/user, so I need to detect failure and record either success or failure to the event log.
I do not need any kind of recovery if it fails.