FTP download multiple files AsyncPro

FTP download multiple files AsyncPro

Post by Madt M » Wed, 29 Jun 2005 06:31:21


I don't use FTP often, but I want to download multiple files from a
stringlist. I have a loop to iterate through the stringlist, so first file
starts to transfer OK (puts the name in the local folder with no content),
but the FTPStatus and FTPReply events don't fire, so remaining files don't
transfer. InProgress remains true, so subsequent Receive commands raise an
error.

The loopy part:
try
if APFTP1.retrieve(RemoteFile, LocalFile, rmReplace) then //
starts OK. . .
while APFTP1.InProgress do begin // hangs here
APFTP1.ProcessCommunications;
end;

except
Exit; // the rest of the files generate an exception
end;

I know there's a simple answer, but I'm not seeing it.
 
 
 

1. FTP Transfer hangs and does not compete the file - or permit multiple file downloads

2. FTP - Multiple file downloads

I have written ftp code which will download a single file from the
Server using the below code:

require 'rubygems'
require 'net/ftp'
require 'fileutils'

URL = 'IP address'
username = 'test'
passwd = "test"
filename = "file1"
directory = '/home/test/'
localfile = 'C:\\Documents and Settings\\User1\\Desktop\\file1'
ftp=Net::FTP.new
ftp.connect(URL,21)
ftp.login(username,passwd)
ftp.chdir(directory)
ftp.getbinaryfile(filename,localfile)
ftp.close

But what i am really looking for is:
1) Download multiple files from a given directory.
2) Download files by giving wild characters (eg: *.xls or *.txt)

Please let me know if there is a better way or easier way to achieve
these tasks.

cheers
--
Posted via http://www.yqcomputer.com/

3. VB FTP Download file in multiple segments (like GetRight)

4. Downloading multiple files from FTP server.

5. Q: Difference between downloading files using ftp.exe and SQL2K DTS FTP Task

6. expect:ftp:downloading new files from a huge ftp account

7. Using Net/FTP to download a file (FTP Error 550)

8. How to handle the error raise if ftp task download is no file download?

9. Download file from FTP : Error 1059 (Open File)

10. how to move a file (instead of upload or download file) in FTP

11. IIS6 FTP: Download files but not list files?

12. Multiple FTP download using Muliti thread

13. Net::FTP problems getting files from Windows FTP server, but not Linux FTP Server.

14. Forcing Download of File Appends HTML from Download Page to Downloaded File?

15. Complex FTP downloading with the default FTP adaptor