On Wed, Nov 4, 2009 at 9:27 PM, ronP12 <[email protected]> wrote:
>
> Hello,
> I am using the SFTP component and I want to change the file name when it is
> placed on the remote server. Basically I would like it to behave like:
>
> from(file:/tmp/input.txt).
> to("sftp:/........./directory/output.txt)
>
> I tried to manipulate the header using.
> setHeader("output.txt", "org.apache.camel.file.name")
> but, camel is not recognizing any changes. It still sets the file name on
> the remote server as input.txt. How can I change this?
>
Which version of Camel are you using as 1.x and 2.0 is very different
on the file/ftp components.
But you should reverse the setHeader operation as its ket, value
> setHeader("output.txt", "org.apache.camel.file.name")
Should be
> setHeader("org.apache.camel.file.name", "output.txt")
Assuming you are using 1.x since that key is for 1.x AFAIR
> Thanks!
> --
> View this message in context:
> http://old.nabble.com/Change-output-file-name-in-SFTP-route-tp26204026p26204026.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