 |
| Reading list of folders and files on FTP server |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
Versions: click to open |
 |
|
 |
 |
| Before you begin: |
 |
This code stores in a cursor list of all files and directories found on FTP server. Note that for some FTPs this can be a time consuming process.
Substitute ??? question marks in the following code with valid FTP server host, user and password values.
Resulting cursor can be displayed in a TreeView Control (this code is not included):

|
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 4771 bytes Created: 2002-11-12 21:58:49 Modified: 2011-12-10 09:20:22 Visits in 7 days: 141 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
Two pairs of functions ( FtpFindFirstFile, InternetFindNextFile ) and ( FindFirstFile, FindNextFile ) work similarly, except one important difference.
Between the FtpFindFirstFile and the InternetCloseHandle calls, the application cannot make another FtpFindFirstFile call for a given FTP session handle. If nevertheless such call is made, the function fails with ERROR_FTP_TRANSFER_IN_PROGRESS error.
The handle returned by the FtpFindFirstFile must be closed with the InternetCloseHandle function when no longer needed.
The FindFirstFile has no such limit; it can have muliple handles opened at the same time.
#kwd: sln_ftp. |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|