in reply to Watching Creation File and send it to Server
Case 1: You can control the application that writes the file:
- Make the application output another "signal" file with size 0 (like "touch signal-file" under Unix) when processing of the file to be written has completed.
- Make the monitoring code react to the signal file instead of the original written file.
Case 2: You can not control the application that writes the file:
- Have the monitoring code start another script that cyclically checks if the size of the file has changed (e.g., every 10 seconds).
- If the file size has not changed since the last check, send the file to the Server.
Brainbench MVP for Perl