On Mon, May 31, 2010 at 3:57 PM, ankelee <[email protected]> wrote: > > Hi > > I have a route where I fetch a batch of files (copies) from an FTP, send > this batch to another route and shutdown the FTP route. > > Then I process the files, and based on that processing I want to delete > these files (one by one) from the FTP. > > Any ideas how I could do this? > > I was thinking using the filename header as a parameter to a from-uri and > then sending that message to nowhere resulting in it being deleted. This > can't be done using the DSL's but I was thinking it might be possible using > something like a FTP-consumer class that takes the uri as a string and then > concat the header on to that string so that only the file with the filename > from the hader gets consume. > > This is somewhat of a workaround but I would like to stick to using Camel > stuff and not do the FTP deletion with Processor and some ftp-lib. > --
The consumer will transfer the file again. If you want to avoid this overhead you may have to use the FTP library to delete the file. However camel-ftp has a FileOperations API where there is a delete method. You may be able to use this API to delete the file. > View this message in context: > http://old.nabble.com/Use-a-route-to-delete-a-file--tp28731278p28731278.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
