cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SFTP - How to delete a file

From: Mathew Simon <msimon_at_simdol.com>
Date: Mon, 27 Aug 2007 12:39:33 -0500

That is a good idea. Thank you!

I may not be able to use the CURLOPT_QUOTE since these actions will take
place even before CWD command, and hence the file to be deleted may not
be reachable. But hopefully I can try the CURLOPT_PREQUTE.

Thanks,
Mathew Simon

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Monday, August 27, 2007 12:01 PM
To: curl-library_at_cool.haxx.se
Subject: Re: SFTP - How to delete a file

On Mon, Aug 27, 2007 at 11:53:09AM -0500, Mathew Simon wrote:
> The decision to delete can be made only after downloading the file,
> and after seeing/verifying the content of the file. Hence, the
> decision to issue CURLOPT_POSTQUOTE cannot be made before the
> download.

Since you are doing many transfers in a loop, you could add
a CURLOPT_QUOTE to delete the previous file on the following file's
download action. For the final file, you will probably need to do a
dummy download of a nonexistent file to force the CURLOPT_QUOTE action
to take place.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address
service
          Let webmasters know that your web site has moved
Received on 2007-08-27