Answering my own question… By adding true to the ZipAggregationStrategy constructor, filenames are preserved.
/M ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Friday, March 26th, 2021 at 16:31, Mikael Andersson Wigander <mikael.andersson.wigan...@pm.me.INVALID> wrote: > Hi > > I'm building a archive solution for files and using the Zip dataformat and > aggregation. > > Trying with the option "preservePathElements=true" but the ZIP file doesn't > include any paths for my files. > > My purpose here is to be able to detect from where in the directory structure > the files comes from. > > My code is similar to the sample > > from("file:input/directory?antInclude=**/*.txt&recursive=true") > .aggregate(constant(true), new ZipAggregationStrategy()) > .completionFromBatchConsumer().eagerCheckCompletion() > .to("file:output/directory"); > > and the only way to add the option is thru the properties file: > > camel.dataformat.zipfile.preserve-path-elements = true > > Pls advice > > /M