You can get the name of the file using the header property =
org.apache.camel.file.name
from("seda:a").filter(header("org.apache.camel.file.name").isEqualTo("file.txt")).to("seda:b");
Regards,
Charles
Thanks Charles
I think it's required to set the header property first.
from("seda:a").convertBodyTo(File.class)
.setHeader(FileComponent.HEADER_FILE_NAME,
el("${in.file.name}"))
.filter(header(FileComponent.HEADER_FILE_NAME).isEqualTo("file.txt")).to("seda:b");
--
View this message in context:
http://www.nabble.com/FileComponent-Routing-tp16141656s22882p16272451.html
Sent from the Camel - Users mailing list archive at Nabble.com.