Hi.
yes:
<camelContext xmlns="http://camel.apache.org/schema/spring">
<template id="camelTemplate"/>
<!-- use myFilter as filter to allow setting ANT paths for which files to scan
for -->
<endpoint id="myFileEndpoint"
uri="file://target/antpathmatcher?recursive=true&filter=#myAntFilter"/>
<route>
<from ref="myFileEndpoint"/>
<to uri="mock:result"/>
</route>
</camelContext>
<!-- we use the antpath file filter to use ant paths for includes and exlucde
-->
<bean id="myAntFilter"
class="org.apache.camel.component.file.AntPathMatcherGenericFileFilter">
<!-- include and file in the subfolder that has day in the name -->
<property name="includes" value="**/subfolder/**/*day*"/>
<!-- exclude all files with bad in name or .xml files. Use comma to seperate
multiple excludes -->
<property name="excludes" value="**/*bad*,**/*.xml"/>
</bean>
You can find this in the documentation:http://camel.apache.org/file2.html
Claus
On 04.04.2011 16:36, jpalmer1026 wrote:
Hi,
I'm working on an app where I need to conditionally route files based on
filename. Ideally I'd like the list of filenames that need to be matched to
be read in from an external file. Is there a simple way to do this using
Camel? Something like the following?
${header.CamelFileName} regex 'fileNameFromExternalFile'
--
View this message in context:
http://camel.465427.n5.nabble.com/Route-Question-tp4281861p4281861.html
Sent from the Camel - Users mailing list archive at Nabble.com.