You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by arvind <ar...@gmail.com> on 2014/06/12 15:00:57 UTC

How to rename the file using spring DSL processed through FTP ?

Hi All,
I am using camel 2.9.2 and trying to rename the file . I Could append
anything to the  file as suffix using *move* parameter but found no way to
change complete file name after processing .
Below is the xml using to transfer the file through FTP 

<route id="ECLTransfer2">
		   	
			<from
uri="file://D:/incoming/ecl_out?filter=#eclFilter&amp;idempotent=true&amp;idempotentRepository=#eclFileStore&amp;delay=20000&amp;move=D:/Camel
Production/ecl_out_archieve/${file:name}.pdf&amp;recursive=true&amp;localWorkDirectory=C:/temp&amp;doneFileName=${file:name}.done"/>
		
			 <to uri="file://D:/processed?tempPrefix=Part_"/>
			
		</route>

In the above case I am able to append pdf at the end of processed file but
want to change the complete file name.Please help me to sort this out .Thank
you in advance



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-rename-the-file-using-spring-DSL-processed-through-FTP-tp5752199.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to rename the file using spring DSL processed through FTP ?

Posted by "kraythe ." <kr...@gmail.com>.
There is a file name header you can set. CamelFileName. See
http://camel.apache.org/ftp2.html

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Thu, Jun 12, 2014 at 8:00 AM, arvind <ar...@gmail.com> wrote:

> Hi All,
> I am using camel 2.9.2 and trying to rename the file . I Could append
> anything to the  file as suffix using *move* parameter but found no way to
> change complete file name after processing .
> Below is the xml using to transfer the file through FTP
>
> <route id="ECLTransfer2">
>
>                         <from
>
> uri="file://D:/incoming/ecl_out?filter=#eclFilter&amp;idempotent=true&amp;idempotentRepository=#eclFileStore&amp;delay=20000&amp;move=D:/Camel
>
> Production/ecl_out_archieve/${file:name}.pdf&amp;recursive=true&amp;localWorkDirectory=C:/temp&amp;doneFileName=${file:name}.done"/>
>
>                          <to uri="file://D:/processed?tempPrefix=Part_"/>
>
>                 </route>
>
> In the above case I am able to append pdf at the end of processed file but
> want to change the complete file name.Please help me to sort this out
> .Thank
> you in advance
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-rename-the-file-using-spring-DSL-processed-through-FTP-tp5752199.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>