cURL / Mailing Lists / curl-library / Single Mail


SFTP - How to delete a file

From: Mathew Simon <>
Date: Mon, 27 Aug 2007 11:02:22 -0500


I am able to download a bunch of files from the SFTP server. The
downloading is in a loop, based on the directory listing. Depending upon
the file name, I need to delete certain files from the SFTP server after
the file is safely downloaded. How can I do it using LIBCURL?

If I use the CURLOPT_POSTQUOTE, then it become applicable to all the
files. I want to delete the files selectively.

Is there a way to re-use the SSH handle (channel) CURL opened, and use
it for deleting the files? Can the libssh2 functions can be used?

Any help or pointers will be appreciated.

Mathew Simon
Received on 2007-08-27