Hi, One option is to add a custom processor to your route that retrieves the filename and puts it in a property. Then you can use this property in the exec command. It should look something like this:
from("file://entree?delete=true") .process(new Processor() { public void process(Exchange exchange) throws Exception { File file = (File) exchange.getIn().getBody(File.class); exchange.setProperty("pickedUpFileName", file.getName()) } }).to(simple("exec:c:/python25/python.exe?args=c:/python25/stepIIS/stepIIS.py ${property.pickedUpFileName}.step -n -l 3")) Take a look at http://camel.apache.org/file.html under "Read from a directory and process the message in java". You can probably even skip the custom processor and work directly on the body using the simple language (or another expression language). See http://camel.apache.org/simple.html. -- View this message in context: http://camel.465427.n5.nabble.com/camel-file-getName-of-file-tp3322455p3322617.html Sent from the Camel - Users mailing list archive at Nabble.com.