I wanted to poll a directory and delete the files and folders that are older than a specified time. I wrote the following code :-
from("file:input?filterFile=${date:file:yyyyMMddHHmm} <= ${date:now-240h:yyyyMMddHHmm}&delay=60000&delete=true")
.log("The headers are ${headers}");
It works fine for files and the old files are deleted but this does not work on folders. Can anyone suggest a way to make it work on folders also?