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=****&fastExistsCheck=true&initialDelay=1000&delay=500&download=true&noop=true
&idempotent=true&idempotentKey=${file:onlyname}&idempotentRepository=#****
&localWorkDirectory=/Users/**/temp/&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.