cURL / Mailing Lists / curl-library / Single Mail


RE: SFTP - How to delete a file

From: Mathew Simon <>
Date: Mon, 27 Aug 2007 23:57:51 -0500

I tried both the CURLOPT_QUOTE AND POSTQUOTE. But both are failing
however way I tried to form the "rm" command.

This is my situation.
SFTP url= s

I am able to download this file. But I am unable to delete this file
using either CURLOPT_QUOTE or POSTQUOTE. If I use CURLOPT_QUOTE, most of
the time the download is also failing and I get the verbose output of
"malformed url" error.

I tried the following combinations
RM filename1.txt
RM ReceiveFiles/filename1.txt
RM /ReceiveFiles/filename1.txt
RM s

I am not sure which form of the "RM" command I should use. Any

Also, I tried to give a simple "pwd" command as CURLOPT_POSTQUOTE, and
this is the only command in the slist. But this is also failing, and the
verbose output massage talks about giving parameters to the SFTP quote
command. I have no idea what is happening.

Mathew Simon

-----Original Message-----
[] On Behalf Of Dan Fandrich
Sent: Monday, August 27, 2007 1:16 PM
Subject: Re: SFTP - How to delete a file

CURLOPT_PREQUOTE isn't supported by sftp because it doesn't make much
sense there. File transfers are done with absolute paths, or paths
relative to the home directory; there's no CWD.

>>> Dan

--              The web change of address
          Let webmasters know that your web site has moved
Received on 2007-08-28