I have a general question which has been asked before but one which is still not answered quite fully IMHO...
I have an application written in VB6 that periodically picks up files from a local share and copies it across to one or more network shares, e.g. U:\ or T:\ etc from where it gets picked up by another VB6 application that I wrote. The application runs unattended 24x7.
99.99% of the time this works great and file collisions are avoided by the application checking for file date and time stamps that a file must have spent some time in a folder before it gets picked up. There are no issues here with files being written by one program whilst being opened by another program.
Now, the problet that I am getting at very rare occasions is that when the network gets busy or over the weekends when there are backup jobs happening the file sometimes just does not get transferred across to the shared mapped drives and no errors are trapped, basically the file fails to be transferred but program does not error. It appears that files disappear into the Twilight Zone...!
Now what I want to know is that can I have a process whereby:
1. I can retry the copying process 3 times, say
2. If it fails then send an automated email to the administrator
3. Copy the failed file locally in some folder for sending later
Alternatively, can I check the share drive's accessability prior to trying to copy the file across and if all OK then copy it, but how can I know that the file did get copied across without corruption or intereference from network, i.e. is there a method or process or mechanism that I can deploy that will tell me for sure that the file did get copied across OK and that all is OK?
Basically it is mission critical for the files to be copied across as pucker files, and if by whatever reason they fail to do so someone should know about it.
Sounds like an old familiar problem but can any one please point me in the right direction? Any code samples would be great but not required, just tell me a reliable process please.
: - )