Hi The Camel file component is only for working with files, eg pick up new files dropped in a directory. Or write messages to files etc.
You have to code the logic yourself to delete directories. On Thu, Apr 15, 2010 at 9:39 AM, lefdev <[email protected]> wrote: > > Thanks for the response. > > This is the whole scenario.I have some backup folders from a previous route > from(""file:/data/inbox") > > .to("file:/backup/?fileName=/${date:now:yyyyMMdd}/${file:name}.gzip"); > Now I want to delete folders older than a week every day . > from("quartz://myTimer?cron=0+0+6+?+*+*") > .bean(DeleteOldBackups.class); > I try to figure out a way to resolve it with camel and EIP and avoid > using > a bean. > That's why i wanted to use the file component somehow. > > > Claus Ibsen-2 wrote: >> >> On Tue, Apr 13, 2010 at 5:55 PM, lefdev <[email protected]> wrote: >>> >>> Hi, I am using camel 2.2 >>> >>> Is there a way to delete subfolders using the file component and >>> recursive >>> option? >> >> No it only delete files. >> >> >>> The following route only deals with files placed in /data/inbox and all >>> it's subfolders. >>> >>> >>> from("file:data/inbox?delete=true&recursive=true") >>> >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/File-consumer-with-recursive%3Dtrue.-Delete-subfolder-tp28232249p28232249.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> >> > > -- > View this message in context: > http://old.nabble.com/File-consumer-with-recursive%3Dtrue.-Delete-subfolder-tp28232249p28252059.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
