Page 1 of 1

check and copy file

Posted: Mon Jun 16, 2008 6:37 am
by Agda Drift
Is it possible to check for a specified filetype in a specified path that have to created within the last 24 hours. And if this is TRUE compress the actual file to another location ELSE send EMAIL notification.

check and copy file

Posted: Fri Jun 20, 2008 10:27 am
by Oleg
Yes, this is possible.
I think that you have to use file loop with date fileter (newer than 1 day)

Algorithm of the task approx such:

set variable CNT to 0
File loop // you have to set the necessary parameters
   increment CNT by 1
   pack file to another place
   delete file
end loop
if CNT = 0 then
   send email notification
end if


Thus, if task find files it packs them to another place and remove them within the loop.
If nothing found, then the task send notification.