I created a route in Java that passed the filename to a Camel Exec function like this:
public void configure() throws Exception { from("file:c:/aaa/FromZip") .setHeader("CamelExecCommandArgs", simple(" ${file:name}")) .to("exec:c:/aaa/Scripts/test.bat"); } and this worked perfectly. How would I define this route using SpringDSL? I unsuccessfully tried the following: <route> <from uri="file:c:/aaa/FromZip"/> <setHeader headerName="CamelExecCommandArgs"><simple>${file:name}</simple></setHeader> <to uri="exec:c:/aaa/Scripts/test.bat"/> </route> It would be really nice if I could get something like the following to work: <route> <from uri="file:c:/aaa/FromZip"/> <to uri="exec:c:/aaa/Scripts/test.bat?args=${file:name}"/> </route> -- View this message in context: http://camel.465427.n5.nabble.com/Passing-filename-to-EXEC-tp3294381p3294381.html Sent from the Camel - Users mailing list archive at Nabble.com.