curl-library
Re: SFTP - How to delete a file
From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 27 Aug 2007 10:00:43 -0700
Date: Mon, 27 Aug 2007 10:00:43 -0700
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 movedReceived on 2007-08-27