great!! It works!!

                CamelContext context = new DefaultCamelContext();
                
        
                
                context.addRoutes(new RouteBuilder() {
                        
                        @Override
                        public void configure() throws Exception {
                        
//from("file://./var/endpoints/inbound?move=.ok&moveFailed=.error&preMove=.processed")
                                
from("file://./var/endpoints/inbound?delete=true")
                        
.setHeader(Exchange.FILE_NAME,simple("${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.${file:ext}"))
                                .to("file://./var/endpoints/processed/");
                                
                                
                                
                                
from("file://./var/endpoints/processed?delete=true&moveFailed=.error")
                                        .choice()
                                                .when().simple("${file:ext} == 
'error'").bean(new
Executor(),"publishError")
                                                        
.to("file://./var/endpoints/processed/.error")
                                                .when().simple("${file:ext} == 
'zip'").bean(new Executor(),"publish")
                                                        
.to("file://./var/endpoints/processed/.zip")
                                                .when().simple("${file:ext} == 
'b64'").bean(new Executor(),"publish")
                                                        
.to("file://./var/endpoints/processed/.b64")
                                                .otherwise()
                                                        
.to("file://./var/endpoints/processed/.notProcessed");
                        }
                });
                
                context.start();

Thank you very much!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Rename-file-in-endpoint-tp5717904p5717939.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to