You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by KhajaNawas14 <kh...@me.com> on 2017/04/18 04:11:28 UTC

Camel Route - File name

Hi All,

currently my query is like any file that comes to this folder will be
processed to next stage. However I would like to add the file name also my
camel route so that i can re-use the same folder for multiple files.

sample folder cd-erpdata-csv
sample file name us-ddmmyy.csv and uk-ddmmyy.csv

<camel:from
uri="file:messaging/cd-erpdata-csv?preMove=inprogress&amp;move=.done"/>






--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Route-File-name-tp5797776.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Route - File name

Posted by Claus Ibsen <cl...@gmail.com>.
You need to use a fileFilter to dynamic chose which files to consume.
There is more details on that file component doc page

On Tue, Apr 18, 2017 at 6:11 AM, KhajaNawas14 <kh...@me.com> wrote:
> Hi All,
>
> currently my query is like any file that comes to this folder will be
> processed to next stage. However I would like to add the file name also my
> camel route so that i can re-use the same folder for multiple files.
>
> sample folder cd-erpdata-csv
> sample file name us-ddmmyy.csv and uk-ddmmyy.csv
>
> <camel:from
> uri="file:messaging/cd-erpdata-csv?preMove=inprogress&amp;move=.done"/>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Route-File-name-tp5797776.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

RE: Camel Route - File name

Posted by KhajaNawas14 <kh...@me.com>.
Thanks, I tried to do it based on the suggested link however I am
encountering the below issue

Tried with the below
${file:name.noext}.org? 

Error

Dynamic expressions with ${ } placeholders is not allowed. Use the fileName
option to set the dynamic expression.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Route-File-name-tp5797776p5797874.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: Camel Route - File name

Posted by "Siano, Stephan" <st...@sap.com>.
Hi,

see http://camel.apache.org/file2.html 

you should especially have a look into the fileName option which will likely do what you want.

Best regards
Stephan

-----Original Message-----
From: KhajaNawas14 [mailto:khaja.nawas@me.com] 
Sent: Dienstag, 18. April 2017 06:14
To: users@camel.apache.org
Subject: Re: Camel Route - File name

Note:- I am a beginner to camel route.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Route-File-name-tp5797776p5797777.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Route - File name

Posted by KhajaNawas14 <kh...@me.com>.
Note:- I am a beginner to camel route.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Route-File-name-tp5797776p5797777.html
Sent from the Camel - Users mailing list archive at Nabble.com.