camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bbuzzard <Billy.Buzz...@bnsflogistics.com>
Subject Passing filename to EXEC
Date Mon, 06 Dec 2010 17:47:26 GMT

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.

Mime
View raw message