Hi,
I needed to check if files are successfully transferred to FTP and an option to delete from source directory if so.
Here is what I came up with, tested and worked fine so far.
The original script was modified so it compares file sizes of the transferred file with the original, and:
-if file size matches, and --DELETE is used file will be deleted from source directory
-if file size matches, and --DELETE is NOT used, file will be moved to /var/spool/asterisk/monitorDONE/FTP/ directory as normal
-if file size does NOT match, error message with file name is displayed and file are not moved nor deleted.
http://www.eflo.net/VICIDIALmantis/view.php?id=197
WARNING- if using --DELETE option please test it first, perl is not my field at all!
Hope it helps.