You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mick Knutson <mk...@baselogic.com> on 2011/08/24 14:00:08 UTC

help changing the extension of files to .txt when writing to file:

I have this route:

        from("direct:writeToFile")
                .setHeader(Exchange.FILE_NAME, constant(
"processed-${in.header.session_id"}*.txt*" ))
                .to( "file:target/reports" )
        ;

the .txt is ignored and the file names look like:

processed-bcfaa932-4d13-4df0-88b8-de5e500e6d06


How can I make the file names like:
processed-bcfaa932-4d13-4df0-88b8-de5e500e6d06*.txt*


---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (855) BASE-LOGIC: (227-3564-42)
p. (478) BASE-LOGIC (227-3564-42)
f. (855) BASE-LOGIC: (227-3564-42)

Website: http://www.baselogic.com
Blog: http://www.baselogic.com/blog/
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
---

Re: help changing the extension of files to .txt when writing to file:

Posted by Claus Ibsen <cl...@gmail.com>.
Use simple instead of constant

On Wed, Aug 24, 2011 at 2:00 PM, Mick Knutson <mk...@baselogic.com> wrote:
> I have this route:
>
>        from("direct:writeToFile")
>                .setHeader(Exchange.FILE_NAME, constant(
> "processed-${in.header.session_id"}*.txt*" ))
>                .to( "file:target/reports" )
>        ;
>
> the .txt is ignored and the file names look like:
>
> processed-bcfaa932-4d13-4df0-88b8-de5e500e6d06
>
>
> How can I make the file names like:
> processed-bcfaa932-4d13-4df0-88b8-de5e500e6d06*.txt*
>
>
> ---
> Thank You…
>
> Mick Knutson, President
>
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (855) BASE-LOGIC: (227-3564-42)
> p. (478) BASE-LOGIC (227-3564-42)
> f. (855) BASE-LOGIC: (227-3564-42)
>
> Website: http://www.baselogic.com
> Blog: http://www.baselogic.com/blog/
> Linked IN: http://linkedin.com/in/mickknutson
> Twitter: http://twitter.com/mickknutson
> ---
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/