I have the following java route: from("c:/temp/files?delete=true&filter=#errorFileFilter") .processRef("processAcceptedFiles") .to("c:/temp/output") ;
The errorFileFilter reference simply returns false if the file name contains some error file markers. The processor simply adds up the lines in the file and adds a header and trailer record to it: BufferedReader inputReader = exchange.getIn().getBody(BufferedReader.class); long idx = 0; try { while (null != (inputReader.readLine())) { idx++; } } catch(Exception e) { e.printStackTrace(); } exchange.getIn().setBody(getHdr() + "\n" + exchange.getIn().getBody(String.class) + getEnd(idx) + "\n"); When the route ends the input file is not deleted. it simply gets reprocessed over and over. So can I do this and still have the input file deleted? I am using camel 2.7.2 -- View this message in context: http://camel.465427.n5.nabble.com/file-delete-doesn-t-work-when-using-filter-tp4632063p4632063.html Sent from the Camel - Users mailing list archive at Nabble.com.