Hi

Yeah use baseFolder as the starting directory. And then use
/${date:now:yyyyMMdd} as prefix for the the file name.

....?fileName=${date:now:yyyyMMdd}/${file:name}

For the name of the file you can use the file language (part of simple
language), see
http://camel.apache.org/file-language.html

There is some examples here
http://camel.apache.org/file-language.html

On Mon, Jul 29, 2013 at 10:17 AM, roger_rabbit <[email protected]> wrote:
> Thank you for your answer.
>
> I understand I can use a custom filter to filter directory based including
> the date I want to process, but not sure it is suited for creating a
> directory with such rule :
> => "write to a directory named /tmp/${yyyyMMdd} and create it if it does not
> exist".
>
> For the moment, I also tried creating the endpoint in my Route Builder :
>
>                         this.folderOut = "file:"+
>                                   baseFolder+
>                                   "/${date:now:yyyyMMdd}?autocreate=true";
>
> But I got an exception saying :
> /Dynamic expressions with ${ } placeholders is not allowed. Use the fileName
> option to set the dynamic expression./
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Using-date-placeholder-in-camel-context-endpoint-tp5736295p5736403.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to