You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gnanaguru S <gn...@wipro.com> on 2011/07/05 15:20:49 UTC

File reading and writing issue

Hi 

This code was successful.  

<from uri="file://inputdir/"/>
<to uri="activemq:queue:inputQueue"/>

But here , when i place a xml file in inputdirectory, it is moving out of
that folder !. I want it just to copied or the to be just read and move to
the queue.

Also from the output queue, i want the contents to be written in a peculiar
file namely: output.xml. 
( " <from uri="activemq:queue:outputQueue"/>
                 <to uri="file://outputdir/"/> " )

Since tried with this code, it didnt worked ( <to
uri="file:target?fileName=output.xmll"/> )

Kindly help me out



Cheers
Guru



--
View this message in context: http://camel.465427.n5.nabble.com/File-reading-and-writing-issue-tp4553224p4553224.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: File reading and writing issue

Posted by Taariq Levack <ta...@gmail.com>.
Hi

Try file://inputdir/?noop=true

noop 	

Default : false 	
If true, the file is not moved or deleted in any way. This option is
good for readonly data, or for ETL type requirements. If noop=true,
Camel will set idempotent=true as well, to avoid consuming the same
files over and over again.

>From http://camel.apache.org/file2.html

Taariq

On Tue, Jul 5, 2011 at 3:20 PM, Gnanaguru S
<gn...@wipro.com> wrote:
>
> Hi
>
> This code was successful.
>
> <from uri="file://inputdir/"/>
> <to uri="activemq:queue:inputQueue"/>
>
> But here , when i place a xml file in inputdirectory, it is moving out of
> that folder !. I want it just to copied or the to be just read and move to
> the queue.
>
> Also from the output queue, i want the contents to be written in a peculiar
> file namely: output.xml.
> ( " <from uri="activemq:queue:outputQueue"/>
>                 <to uri="file://outputdir/"/> " )
>
> Since tried with this code, it didnt worked ( <to
> uri="file:target?fileName=output.xmll"/> )
>
> Kindly help me out
>
>
>
> Cheers
> Guru
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/File-reading-and-writing-issue-tp4553224p4553224.html
> Sent from the Camel - Users mailing list archive at Nabble.com.