Any idea as to why this does not seem to work?

      <setHeader headerName="ExecBinding.EXEC_COMMAND_ARGS">
        <simple>/C move
${body[FileDetails][FilePath]}\\${body[FileDetails][FileName]}
E:\\temp</simple>
      </setHeader>

      <to uri="exec:cmd" />

I am attempting to build the set of arguments dynamically. I found a thread
that seemed to indicate that I could set the ExecBinding.EXE_COMMAND_ARGS
header to a space delimited string, but that does not appear to work.

When I turn on tracing I get the following:

Mon Nov 12 2012 20:28:45 GMT-0500 (Eastern Standard Time)       INFO    The 
command
ExecCommand [args=[${in.headers.EXEC_COMMAND_ARGS}], executable=cmd,
timeout=9223372036854775807, outFile=null, workingDir=null,
useStderrOnEmptyStdout=false] had exit value 0          

Mon Nov 12 2012 20:28:45 GMT-0500 (Eastern Standard Time)       INFO    
Executing
ExecCommand [args=[${in.headers.EXEC_COMMAND_ARGS}], executable=cmd,
timeout=9223372036854775807, outFile=null, workingDir=null,
useStderrOnEmptyStdout=false]
                
Mon Nov 12 2012 20:28:45 GMT-0500 (Eastern Standard Time)       INFO
ID-WMORMANS-27499-1352751723623-32-1 >>> (oec.publishing.data.filemove)
setHeader[EXEC_COMMAND_ARGS] -->
exec://cmd?args=%24%7Bin.headers.EXEC_COMMAND_ARGS%7D <<< Pattern:InOnly,
Headers:{JMSMessageID=ID:WMORMANS-27498-1352751721636-8:183126:1:2:1,
Cache-Control=private, Content-Length=329, JMSReplyTo=null,
JMSDeliveryMode=2, JMSCorrelationID=null, JMSExpiration=0,
CamelHttpResponseCode=200, JMSPriority=1,
JMSDestination=queue://oec.publishing.data.filemove, EXEC_COMMAND_ARGS=/C
move
E:\InventoryDrop\Publishing\NewDataReceived\ControlData\Manufacturer\.received\\Manufacturers.csv
E:\\temp, ExchangeId=d35d69c6-bf94-45de-a58d-1762c974ce8d, JMSType=null,
breadcrumbId=ID:WMORMANS-27498-1352751721636-8:183126:1:2:1,
Connection=Close, Content-Type=application/json; charset=utf-8,
JMSTimestamp=1352770124948, JMSRedelivered=false,
X-AspNet-Version=4.0.30319, JMSXGroupID=null, Date=Tue, 13 Nov 2012 01:28:44
GMT, Server=ASP.NET Development Server/10.0.0.0},
BodyType:java.util.HashMap,
Body:{FileDetails={FilePath=E:\InventoryDrop\Publishing\NewDataReceived\ControlData\Manufacturer\.received,
FileName=Manufacturers.csv, FileExtension=csv, FileSize=3526},
ExchangeState=FileStaged, ExchangeId=d35d69c6-bf94-45de-a58d-1762c974ce8d}



--
View this message in context: 
http://camel.465427.n5.nabble.com/Can-I-perform-a-move-file-operation-in-camel-tp5722620p5722629.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to