cURL / Mailing Lists / curl-library / Single Mail

curl-library

How can I use libcurl to get multi files from ftp server

From: casper casper <tlmcasper_at_hotmail.com>
Date: Tue, 01 Aug 2006 11:43:47 +0000

I get problem when I try to get multi files from ftp server, the libcurl
can get the first file successful, but the rest are all failed, following
is the debug message:

< 220 Serv-U FTP Server v5.2 for WinSock ready...
> USER casper
< 331 User name okay, need password.
> PASS *****
< 230 User logged in, proceed.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (172,22,113,27,8,16)
* Trying 172.22.113.27... * connected
* Connecting to 172.22.113.27 (172.22.113.27) port 2064
> TYPE I
< 200 Type set to I.
> SIZE we_will_rock_you.wmv
< 213 1871036
> RETR we_will_rock_you.wmv
< 150 Opening BINARY mode data connection for we_will_rock_you.wmv (1871036
Byte
s).
* Getting file with size: 1871036
* Failed writing body
* Received only partial file: 0 bytes
* Closing connection #0
* failed writing received data to disk/application

I store all the urls in a list, and transfer them one by one by using a FOR
cycle, invoke the curl_easy_perform() function, reuse the last connection.I
use libcurl 7.15.4 under windows XP, .Net.

Any suggestion will be appreciated.Thanks

_________________________________________________________________
享用世界上最大的电子邮件系统— MSN Hotmail。 http://www.hotmail.com
Received on 2006-08-01