On Wed, Feb 20, 2013 at 4:24 PM, AndyBell
<andy.b...@dstglobalsolutions.com> wrote:
> Hi
>
> Midway through my route, I need to look in a folder and move any files there
> that meet a certain filename pattern into another folder.
>
> I'm not getting far with this - I am trying to use a consumerTemplate  but
> only the first file gets processed and the others end up with camel
> lockfiles being created but nothing else happens...
>
> What's the best approach for this - I would have thought it should be a
> trivial task?
>

Sometimes its easier to just write a bit of java code. The
java.io.File API allows you to rename files.
As well list all files in a directory etc.

The ConsumerTemplate API is per message, so you cannot do *bulk*
message processing.

An alternative is to have a little Camel route that routes the files,
and when there is no more files, you stop this route.



> Andy
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Move-multiple-files-mid-route-tp5727879.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to