Hi Are you trying to bulk together all todays messages into a single file with the name yyyyMMdd and you struggle to know when there are no more messages and this file is to be rotated. Not really sure exactly what you attempt, but if a shell script is easier and better then that is also welcome.
Or are you trying once in a while to sync todays messages to a FTP server (such as once per hour). On Fri, Sep 26, 2025 at 10:11 AM Peter Hicks <peter.hi...@poggs.co.uk.invalid> wrote: > Hello > > I'm using the File component to archive messages sent to topics on an > ActiveMQ server, using ${date:now:yyyyMMdd} in the filename to > automatically rotate files. > > I'd like to use another Camel route to copy completed log files to an SFTP > server, but I'm finding it difficult to work out how to identify when a > file is 'complete'. Since messages are written one by one and appended to a > file, the 'doneFIleName' parameter writes a .done file after the first > message is logged, so I can't use the presence of a doneFile to trigger an > upload. > > Other options I've looked at include looking at the last modified > timestamp, and trying to match all files from the previous hour, but I > can't get this to work. > > Is there a reasonably straightforward pattern that can handle exporting > 'old' files in this way, or should I look at writing a shell script instead? > > Peter -- Claus Ibsen