Here is the solution : from("file://entree?delete=true") .process(new Processor() { public void process(Exchange exchange) throws Exception { Map<String,Object> a= exchange.getIn().getHeaders(); String namefile = (String)a.get("camelfilenameonly"); namefile = namefile.substring(0,namefile.indexOf(".")); System.out.println(namefile); String newEndpoint = "exec:c:/python25/python.exe?args=c:/python25/stepIIS/stepIIS.py c:/python25/stepIIS/"+namefile+".step -n -l 3"; Exchange e = exchange.getContext().createProducerTemplate().send(newEndpoint,exchange); String res = e.getIn().getBody(String.class); System.out.println(res); }});
thks for your help Valery -- View this message in context: http://camel.465427.n5.nabble.com/camel-file-getName-of-file-tp3322455p3330732.html Sent from the Camel - Users mailing list archive at Nabble.com.