curl-users
Re: How to download and rename/delete a file from a remote SSL ftp server by curl?
Date: Thu, 13 Jan 2005 20:46:42 +0000 (UTC)
Daniel Stenberg <daniel-curl <at> haxx.se> writes:
>
> On Thu, 13 Jan 2005, Liang Cai wrote:
>
> > Can someone please tell me how to use curl (on HP unix) to download and
> > rename/delete a file from a remote SSL ftp server ??
>
> Something like this (this should be written in one single line):
>
> curl -Q "-RNFR fromfile" -Q "-RNTO tofile" -Q "-DELE rmfile"
> ftps://ftps-site.com/file/to/transfer
>
> If you want the more recent spec-following approach, you use a ftp:// URL and
> the --ftp-ssl option instead of the ftps:// URL like above.
>
Sorry, I didn't try this properly. It seems that a problem still there. Here is
the command line I typed in:
curl -u username:password -Q "-RNFR fromfile" -Q "-RNTO fromfile.old" -O
ftps://ftps-site.com/DOWNLOAD/fromfile
The purpose is to download the file "fromfile" and rename it to "fromfile.old"
on the server after it is downloaded.
The file is downloaded successfully, but the rename part didn't work. Here is
what shows up on the screen when I run the above command line:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1436 100 1436 0 0 924 0 0:00:01 0:00:01 --:--:-- 0
curl: (21) QUOT string not accepted: RNFR CC050111_ack.txt
Can you please advise?
Received on 2005-01-13