On 16 May 2013, at 12:23, Peter Hilton <pedro+ca...@lunatech.com> wrote: > I’m using Camel to process files, and need to save a copy of each incoming > file to an 'archive' directory. In addition, if another file arrives with the > same name as an earlier file, I must add this to the archive with a different > file name and not overwrite an existing archive file.
I'm currently hoping to do it like this: wireTap("file:///archive?fileName=${date:now:yyyy/DDD}/${file:name}", archiveFileNameProcessor) … where archiveFileNameProcessor is a Processor that modifies the file name (to avoid overwriting existing files). How can I parse the URL in my processor to get today’s path, e.g. archive/2013/136? The processor to check this directory for existing files, in order to calculate the next file name in the sequence, for duplicate input file names. Peter