Hi

Could you try with 2.2-SNAPSHOT ?

It is a bit odd since Camel should pickup .done as a relative directly
and not as a absolute filename.

You can also try to use
move=.done/${file:name}

Which should be what Camel translates .done to under the covers.



On Thu, Jan 21, 2010 at 5:08 PM, ariablu <962...@gmail.com> wrote:
>
> using Apache Camel 2.1 and Spring,
> route: File -> Processor -> (cxf) -> Log
>
> When ...
> /_work/test/from/1.txt
>
> if I run test case, 1.txt file was moved to
> /_work/test/from/.done (not directory!)
>
> But I want
> /_work/test/from/.done/1.txt
>
> --------------------------------------------------------
> [[test case]]
>  <camelContext xmlns="http://camel.apache.org/schema/spring";>
>   <endpoint id="file1"
> uri="file:C:\_work\test\from?delete=false&amp;noop=false&amp;move=.done"/>
>   <route>
>     <from ref="file1"/>
>     <process ref="process1"/>
>     <!--  to uri="cxf"  -->
>     <to
> uri="log:testlog?level=INFO&amp;showExchangeId=true&amp;showProperties=true&amp;showBodyType=true&amp;showBody=true&amp;showOut=true&amp;multiline=true&amp;showHeaders=true"/>
>   </route>
>  </camelContext>
>  <bean class="test.impl.Trans" id="process1"/>
> --------------------------------------------------------
> [[test processor]]
> package test.impl;
> import org.apache.camel.Exchange;
> import org.apache.camel.Processor;
> public class Trans implements Processor {
>       public void process(Exchange exchange) throws Exception {
>               exchange.getOut().setHeader("operationNameSpace",
> "http://pc.ws";);
>               exchange.getOut().setHeader("operationName", "echo");
>               exchange.getOut().setBody(new Object[]{"AAAAA", "BBBBB"});
> }       }
> --------------------------------------------------------
> [[Log]]
> INFO testlog - Exchange[
> , Id:ffa13059-6465-4bb0-b9ca-8de545c50618
> ,
> Properties:{CamelToEndpoint=log://testlog?level=INFO&multiline=true&showBody=true&showBodyType=true&showExchangeId=true&showHeaders=true&showOut=true&showProperties=true,
> CamelBatchSize=1, CamelBatchComplete=true,
> CamelFileExchangeFile=GenericFile[C:\_work\test\from\1.txt],
> CamelBatchIndex=0}
> , Headers:{operationName=echo, operationNameSpace=http://pc.ws}
> , BodyType:Object[]
> , Body:[Ljava.lang.Object;@16be13b
> , Out: null]
> DEBUG GenericFileOnCompletion - Done processing file:
> GeneriacFile[C:\_work\test\from\1.txt] using exchange:
> Exchange[GenericFileMessage with body: [Ljava.lang.Object;@16be13b]
> DEBUG GenericFileRenameProcessStrategy - Renaming file:
> GenericFile[C:\_work\test\from\1.txt] to: GenericFile[\\.done]
> DEBUG FileUtil - Tried 1 to rename file: C:\_work\test\from\1.txt to:
> C:\_work\test\from\.done with result: true
> --------------------------------------------------------
>
> Thanks!
> --
> View this message in context: 
> http://old.nabble.com/FileConsumer-move-a-file-to-wrong-destination.-tp27260194p27260194.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

Reply via email to