Hi You can use a custom filter, and implement the code using java, where you return true | false if a directory / file should be accepted or not. Then you can implement the logic in java code to use current day - 7 days.
On Tue, Oct 28, 2014 at 12:33 PM, geppo <geppore...@gmail.com> wrote: > Hi, I need to set a Camel route which polls files from a directory and all > its subdirectories every 5 minutes: > > /2014/Jan/1 > /2014/Jan/2 > ... > /2014/Oct/28 > > The way it is at the moment it's scanning all subdirectories from the first > of January to today, which is very slow. > > I would like to specify an expression where it only scans the last 7 days > subfolders, but I don't know how to achieve that. > > I have seen the expression ${date:now:yyyy}/${date:now:MM}/${date:now:dd} > so I was hoping for something like: > ${date:now-7days:yyyy}/${date:now-7days:MM}/${date:now-7days:dd} > > Is this possible? What's the correct syntax? > I can't find anything in the online documentation. > Many thanks! > > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Expression-Language-and-date-now-minus-plus-N-days-tp5758210.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/