Notify when file is not dropped

Discuss RoboTask here
Post Reply
agonzo
Posts: 4
Joined: Sat Apr 23, 2005 1:33 pm
Location: United States

Notify when file is not dropped

Post 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?
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Notify when file is not dropped

Post 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.
agonzo
Posts: 4
Joined: Sat Apr 23, 2005 1:33 pm
Location: United States

Notify when file is not dropped

Post 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.
Last edited by agonzo on Sat May 28, 2005 11:10 pm, edited 1 time in total.
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Notify when file is not dropped

Post 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
Post Reply