You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Sri <sr...@googlemail.com> on 2010/10/30 14:29:53 UTC

ftp tempFile Name extension

Hi All,

I want to use tempFileName=somename.{somenumber} on the FTP URI.  is it
possible to use it insted of 
tempFileName=somename.tmp

Regards
Sri
-- 
View this message in context: http://camel.465427.n5.nabble.com/ftp-tempFile-Name-extension-tp3243271p3243271.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ftp tempFile Name extension

Posted by Richard Kettelerij <ri...@gmail.com>.
This is possible using the simple language. You can use a date as a suffix,
e.g: tempFileName="somename.${date:now:yyyyMMdd}". This is the most easy
solution imho. 

If you don't want to use a date but need a number you can delegate to a
custom bean to generate a number (or you can use an UUID). Example:
tempFileName="somename.${bean:mynumbergenerator.generateid}"

Take a look at http://camel.apache.org/file-language.html

-----
Richard Kettelerij,
http://github.com/rkettelerij
-- 
View this message in context: http://camel.465427.n5.nabble.com/ftp-tempFile-Name-extension-tp3243271p3243285.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ftp tempFile Name extension

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Oct 30, 2010 at 2:29 PM, Sri <sr...@googlemail.com> wrote:
>
> Hi All,
>
> I want to use tempFileName=somename.{somenumber} on the FTP URI.  is it
> possible to use it insted of
> tempFileName=somename.tmp
>

Yeah you can use a bean to compute the somenumber.

See here
http://camel.apache.org/file-language.html

The bean:myguidgenerator example

> Regards
> Sri
> --
> View this message in context: http://camel.465427.n5.nabble.com/ftp-tempFile-Name-extension-tp3243271p3243271.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



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