cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Noob question: quoted DELE command returns 19 on success

From: G. T. Stresen-Reuter <tedmasterweb_at_gmail.com>
Date: Fri, 9 Jan 2009 19:05:18 +0000

On Jan 9, 2009, at 6:33 PM, Dan Fandrich wrote:

> On Fri, Jan 09, 2009 at 02:55:28PM +0000, G. T. Stresen-Reuter wrote:
>> I'm trying to use curl from within a bash script to delete a file via
>> FTP. Here is a sample of the command I am using
>>
>> curl -v -u user:pass ftp://domain.com/httpdocs/samples/test.txt -Q
>> "dele
>> httpdocs/samples/test.txt" --ftp-method nocwd
>>
>> I was hoping the return value of the command would tell me whether
>> or not
>> the quoted DELE command succeeded or not. A return value of 0 would
>> mean
>> success while other values would mean some kind of error.
>
> Try adding --head. That will skip the download and should do what
> you want.
>
>>
> Dan

That did indeed reduce the listing that was following the dele
command, but it still tries to get info on a non-existent file, which
returns the 19 code.

I guess this is something I can live with, though, so, unless someone
has another idea, thanks for the help!

Ted S-R

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-01-09