If you are trying to delete a file after consuming from a ftp server using
ftp camel component, then put the option "delete=true" while configuring
the ftp consumer end point.

Make sure the ftp credentials u are using has rights to perform delete
operations .

Cheers
Reji
On 01/04/2014 3:01 pm, "eddi" <edgar.wentzl...@gmx.net> wrote:

> I find a Way for send direct File Opperations to the FTP Endpoint.
>
> from("jetty:http://localhost:7777/action/delete";)
>             .process(new Processor() {
>                 @Override
>                 public void process(Exchange exchange) throws Exception {
>                     RemoteFileEndpoint<?> ftpEp = (RemoteFileEndpoint<?>)
> getContext().getEndpoint("ftp://user@localhost/share?password=123";);
>                     RemoteFileOperations<?> operation =
> ftpEp.createRemoteFileOperations();
>                     operation.connect(ftpEp.getConfiguration());
>                     boolean deleted =
>
> operation.deleteFile(ftpEp.getConfiguration().getDirectory()+"/"+"fromJetty.txt");
>                     exchange.getOut().setBody("DELETED = "+deleted);
>                     operation.disconnect();
>                 }
>             });
>
> Debug and Trace really helps very much.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Howto-delete-file-from-FTP-Endpoint-direct-tp5749570p5749617.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to