Page 1 of 1
Notify when file is not dropped
Posted: Fri May 27, 2005 9:17 pm
by agonzo
Is it possible to get emailed when a file is not dropped in a folder at a certain time? For example, I drop a file at 8 pm. If the file is not in the folder at 8 pm I need to send an email. How can this be done?
Notify when file is not dropped
Posted: Sat May 28, 2005 7:30 am
by Oleg
If it is a file with known name, use FileExists macro variable. Your task will looks so:
If {FileExists(c:\MyFilder\MyFile.txt)} = False
SendMail
End if
This task can be started by scheduler at 8:00 PM.
If you don't know name of file (files) beforehand, you can use File loop. Your task will be more complex. I can write a sample task if needed.
Notify when file is not dropped
Posted: Sat May 28, 2005 7:09 pm
by agonzo
First, thanks for the quick response. Second, what if the file name is part static and part dynamic? For example the file may have a date appended to it like file12052005.dat today and tomorrow it be file12062005.dat.
Notify when file is not dropped
Posted: Sat May 28, 2005 9:57 pm
by Oleg
I.e. your file name has this format: fileMMDDYYYY.dat where
MM - current month
DD - current day
YYYY - current year
Is it correct?
Ok. You can use MonthNo, Day and Year macrovariables.
Your file name will be such:
file{MonthNo}{Day}{Year}.dat
put this file name into "if then" action, like this:
If {FileExists(c:\MyFilder\file{MonthNo}{Day}{Year}.dat)} = False
SendMail
End if