Used GenericFileFilter and it worked just fine.  Just adding it here incase
anyone wants to refer

public class AFilter implements GenericFileFilter {

        private String patternFormat;
        private Pattern pattern;
        private Matcher matcher;

        public AFilter(String patternFormat) {
                this.patternFormat = patternFormat;
                pattern = Pattern.compile(this.patternFormat);
        }

        public boolean accept(GenericFile pathname) {

                matcher = pattern.matcher(pathname.getFileName());
                return matcher.matches();
        }
}


<bean id="aFilter" class="AFilter">
<constructor-arg value="aaa_bbb_\d+_\d{10}\.zip" />
</bean>


<from
uri="sftp://****?password=****&amp;fastExistsCheck=true&amp;initialDelay=1000&amp;delay=500&amp;download=true&amp;noop=true
 
&amp;idempotent=true&amp;idempotentKey=${file:onlyname}&amp;idempotentRepository=#****
 
&amp;localWorkDirectory=/Users/**/temp/&amp;filter=#aFilter" />




--
View this message in context: 
http://camel.465427.n5.nabble.com/file2-include-regex-not-reading-files-from-ftpserver-tp5788129p5788179.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to