date filter and file loop

Discuss RoboTask here
Post Reply
Jambondeau
Posts: 1
Joined: Tue Apr 15, 2008 4:48 am
Location: Netherlands

date filter and file loop

Post by Jambondeau »

I want to write a task which looks for files older than 'x' days. So I want to use a variable in the date filter tab of the file loop. I tried to put a variable in the 'older then .... days'. When I press OK and reopen the file loop to edit, then the variable has disappeared.This task is supposed to proces directories from an sql table. 'older than ... days' is also one of the fields of the table.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

date filter and file loop

Post by Oleg »

You can use the following algorythm

File loop //without filters and
             //save filetime into c_date variable
   if {c_date} < {DateIncDays(-{MyVar})} then
   ...
   do something
   ...
   end if
end loop

variable MyVar must contain some integer value (days)
Post Reply