Reputation: 27
I would like to consume file from a directory which matches the below pattern
File Pattern: InputFile_yymmdd_HHmmss.csv
How do I specify the pattern yymmdd_HHmmss in Apache Camel?
Please Note: I am not using XML based route in Camel. My sample code looks in the below mentioned format.
from("file:src/main/resources/csv/InputFile_yymmdd_HHmmss.csv").log(loggingLevel.INFO, "File Read")
Any sample code would solve my problem.
The route is not getting initialised when I use the above code
Upvotes: 0
Views: 471
Reputation: 51481
Camel File component supports an include
property that can define a regex pattern for files.
from("file:src/main/resources/csv?include=InputFile_\\d{6}_\\d{6}\.csv")
.log(loggingLevel.INFO, "File Read")
Upvotes: 1