The solution for the first route listed above has evolved as below with some
issues. Please assist me in fixing it

from("file:{{fmsSys.root.File.InProgress.In}}?noop=true&recursive=true&filter=#myInFMSDirectoryFilter&antInclude={{fmsSys.root.ClientFile.Mailbox.AntIncludeDir}}&delay=500").routeId("InFMSReader")
 
               
.to("log:?level=INFO&showExchangeId=true&showHeaders=true&showProperties=true&multiline=true")
                .setBody().simple("${in.header.CamelFileAbsolutePath}")
                .setBody(body().append("\n"))
                .log("Message is ${in.header.CamelFileAbsolutePath}")
                .setHeader(Exchange.FILE_NAME,constant("outputlist.txt"))
               
.to("file:data/FMSTest/outbox?fileExist=Append&doneFileName=outputlist.txt.done")
//if this statement is commented I see all the files that are old 1 hr and
above.
        ;

Based on the above solution, could you please answer the below questions
1)How can I append all the file names that are 1 hr and above to
outputlist.txt ? Currently with the above solution it only has some file
names written to the outputlist.txt .But if I comment out the last
".to("File:data/FMSTest...)", I am able to see that the route gets all the
file names that are required. 
2)I want to create a done file at the end of creation of the outputlist.txt.
I suspect my above solution will not work for my requirement because it
looks like the file reader serially writes one file name at a time to the
outputlist.txt and also writes a outputlist.txt.done and for the next
filename it goes on to append to the outputlist.txt and overwrites the
outputlist.txt.done. Please advice on how I could implement that?



--
View this message in context: 
http://camel.465427.n5.nabble.com/File-component-consumer-to-consume-files-by-timestamp-based-tp5740319p5745290.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to