Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Download Multple Files from an FTP Server
Downloads files from the current FTP remote directory matching a wildcard pattern.
set ftp = CreateObject("Chilkat.Ftp2")
ftp.UnlockComponent "any string begins the 30-day trial"
ftp.Username = "***"
ftp.Password = "***"
ftp.Hostname = "ftp.***.com"
ok = ftp.Connect()
if (ok <> 1) then
MsgBox ftp.LastErrorText
end if
' Download all files in the current remote FTP directory
' matching a pattern to a local directory.
localDir = "fromFtp"
remotePattern = "*.html"
numDownloaded = ftp.MGetFiles(remotePattern, localDir)
if (numDownloaded = -1) then
MsgBox ftp.LastErrorText
else
MsgBox "Downloaded " & numDownloaded & " files."
end if
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.