curl-users
Re: Getting -Q to work
Date: Mon, 13 May 2013 09:48:41 +0200 (CEST)
On Sun, 12 May 2013, Mike Brown wrote:
> If I then do the following, it errors out:
>
> curl -k -u username:password ftps://domain.com/ -Q rm file.name.zip
Add -v and see the command being sent. -Q takes one parameter so this will
only send "rm" while "file.name.zip" will be treated as an additional URL on
the command line!
> curl -k -u username:password ftps://domain.com/ -Q "rm file.name.zip"
This sends "rm file.name.zip" to the server. But there's no FTP command called
'rm' so there's no suprise here. The command to delete a file is called 'DELE'
in FTP protocol land.
> Once I get that to work, I'm assuming I can delete subdirectory files by
> doing the following:
>
> curl -k -u username:password ftps://domain.com/ -Q cd subdir -Q rm
> file.name.zip
Yes, assuming you use the correct commands. 'cd' is CWD for example...
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2013-05-13