I'm looking for a way to do a combination of a couple of things. Would it be possible to have an e-mail sent when new files are added to an FTP site. A plus would be to have the e-mail contain info on what folders have new content.
This is only a sketch but a first approach would be ask the server for a file list every 30 seconds. Compare the new list with the last one and if they are different send an email. Something like:
[scriptftp file="check_for_file_list_changed.ftp"]:start
GETLIST($list1,REMOTE_FILES)
IF($list1!=$list2)
# file lists are different. Send an email here. See the help topic:
# http://www.scriptftp.com/reference.php?go=topic123
END IF
# Wait 30 seconds
SLEEP(30)
$list2=$list1
# Jump to the beginning
GOTO :start[/ScriptFTP]
[scriptftp file="check_for_file_list_changed.ftp"]:start
GETLIST($list1,REMOTE_FILES)
IF($list1!=$list2)
# file lists are different. Send an email here. See the help topic:
# http://www.scriptftp.com/reference.php?go=topic123
END IF
# Wait 30 seconds
SLEEP(30)
$list2=$list1
# Jump to the beginning
GOTO :start[/ScriptFTP]
liked Script FTP? Try our other product Email Parser