You'll need to have some communication between your processes so one knows that the other has locked the file and the copy can proceed. I wrote my replication program to be run from cron. It waits for a time trying to establish the correct lock, you might try the 'delay and retry' method.
True. The two process are COM server and client so they do speak with each other and indeed one will lock using the "BEGIN IMMEDIATE" and the other will read and then the first will COMMIT. Thanks, Ran