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 Directory TreeDownload a directory tree from an FTP server, re-creating it on the local filesystem. Downloads: MS Windows Visual C/C++ Libraries Linux/CentOS C/C++ Libraries MAC OS X C/C++ Libraries Solaris C/C++ Libraries C++ Builder Libraries FreeBSD C++ Libraries HP-UX C++ Libraries BlackBerry QNX C++ Libraries #include <C_CkFtp2.h> void ChilkatSample(void) { HCkFtp2 ftp; BOOL success; ftp = CkFtp2_Create(); // Any string unlocks the component for the 1st 30-days. success = CkFtp2_UnlockComponent(ftp,"Anything for 30-day trial"); if (success != TRUE) { printf("%s\n",CkFtp2_lastErrorText(ftp)); return; } // This is a public (read-only) FTP site that can be tested. // The username/password is valid: CkFtp2_putHostname(ftp,"ftp.secureftp-test.com"); CkFtp2_putUsername(ftp,"test"); CkFtp2_putPassword(ftp,"test"); // Connect and login to the FTP server. success = CkFtp2_Connect(ftp); if (success != TRUE) { printf("%s\n",CkFtp2_lastErrorText(ftp)); return; } // Set the current remote directory to the root of // the tree to be downloaded. // success = ftp.ChangeRemoteDir("/something"); // if (success != cktrue) { // msgbox ftp.LastErrorText; // return; // } // Download the entire tree, recreating it at c:/temp/something success = CkFtp2_DownloadTree(ftp,"c:/temp/something2"); if (success != TRUE) { printf("%s\n",CkFtp2_lastErrorText(ftp)); return; } CkFtp2_Disconnect(ftp); CkFtp2_Dispose(ftp); } |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.