I’m working on a Spring Integration application using the file reader support. I’m trying to use a regex filter for picking up the file desired. The name of the file would look something like “S20110322.txt” with a new file for each day, but with the same “S” prefix. My application will be running the day after a file is created so that it captures all the data for that day. I’m able to use a regex filter that will match the format for any date, but I specifically need the regex pattern to only match today’s date less one day since the application will automatically run daily.
In terms of Java, I could accomplish this using a SimpleDateFormat and write the Java code, but I’m just trying to see if I can accomplish it without the Java code and merely using Spring Integration’s int-file:inbound-channel-adapter.
If you only need to match yesterday’s date, I can’t see why you’d need a regular expression or a filter at all – you know the exact file that you want, don’t you? Why don’t you just load that specific file?