cURL / Mailing Lists / curl-users / Single Mail

curl-users

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

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 9 Jan 2009 10:33:46 -0800

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

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
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