sending mail when ever a new file ariive in ftp

Hello ,
I want to see if I’m getting a new file in my router , if so to send my to my mail the file.
how can I do this?
how do I check for “new file” every 1 min?
the mail configuration is working, I can send mail , but how to search the file?

Thank,

I am thinking in a script for check how many files you have in the server, and if a new file is arrived execute the email script.
{
global files
local file [len [file find ]]
if ($files!=file) do={
global files $file
log error “new file uploaded”
system script run “emailscript”
}}you can improve it..

I will try it and let you know

Thanks ,