cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Does the -Z option work when using FTP with cURL?

From: Mike Maynard <mmaynard_at_ddpnm.com>
Date: Thu, 21 Sep 2006 16:53:12 -0600

The -v output is below. I don't see cURL issuing the MDTM command to the
FTP server. I manually connected to the FTP server and did a REMOTEHELP
command:

ftp> remotehelp
214-The following commands are recognized:
   ABOR
   ACCT
   ALLO
   APPE
   AUTH
   CDUP
   CWD
   DELE
   FEAT
   HELP
   LIST
   MKD
   MLSD
   MLST
   MODE
   NLST
   NOOP
   OPTS
   PASS
   PASV
   PBSZ
   PORT
   PROT
   PWD
   QUIT
   REIN
   REST
   RETR
   RMD
   RNFR
   RNTO
   SITE
   SIZE
   SMNT
   STAT
   STOR
   STOU
   STRU
   SYST
   TYPE
   USER
   XCUP
   XCWD
   XMKD
   XPWD
   XRMD
214-The special commands are recognized:
   SITE CHAT
   COMB
   XCRC
214 HELP command successful.
ftp>

======================================= snip==============
(Masked output from -v follows:)

C:\Batch>curl -o "\\DDPROXY\C$\iFTPSvc\ddproxy\users\xyz\Outputfile.TXT"
-Z
"\\DDCOM\C$\Eligib~1\Test\Comple~1\CompareFileTimestamp.TXT" -L -sS -f
-v --anyauth -k "ft
p://FTP-ID:FTP-PW_at_ftp.site/DownloadFile.TXT"

* About to connect() to ftp.site port 21
* Connected to ftp.site (xxx.xx.xx.236) port 21
< 220 GlobalSCAPE Secure FTP Server (v. 3.2)
> USER FTP-ID
< 331 Password required for FTP-ID.
> PASS FTP-PW
< 230 Login OK. Proceed.
* We have successfully logged in
> PWD
< 257 "/" is current folder.
* Entry path is '/'
> EPSV
< 500 'EPSV': command not understood.
> PASV
< 227 Entering Passive Mode (xxx,xx,xx,xxx,14,160).
* About to connect() to ftp.site 3744
* Connecting to ftp.site (xxx.xx.xx.xxx) port 3744
* Connected the data stream with PASV!
> TYPE I
< 200 Type set to I.
> SIZE DownloadFile.TXT
< 213 16614044
> RETR DownloadFile.TXT
< 150 Opening BINARY mode data connection for DownloadFile.TXT.
* Getting file with size: 16614044
< 226 Transfer complete. 16614044 bytes transferred. 53080 Bps.
* Connection #0 left intact
> QUIT
< 221 Service closing control connection.
* Closing connection #0

=========================================== snip ==========

-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se
[mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Thursday, September 21, 2006 4:37 PM
To: the curl tool
Subject: Re: Does the -Z option work when using FTP with cURL?

On Thu, Sep 21, 2006 at 04:03:07PM -0600, Mike Maynard wrote:
> Sorry... My bad.
>
> The -Z (uppercase) is an invalid option. The -z (lowercase) always
> retrieves the file regardless of the date/time of the target filename
> following the -z option.

Does the FTP server support the MDTM command? That's a prerequisite to
-z working. Use -v to trace the download and see what it says.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address
service
          Let webmasters know that your web site has moved
Received on 2006-09-22