| Listing Files | ||
|
In addition to uploading and downloading files, the FTP control can also be used to list the files that are in a specific directory on the server. This is done by using three methods: OpenDirectory, ReadDirectory and CloseDirectory. For example, consider a form with two TextBox controls, a ListBox control and a CommandButton control. The first TextBox control is used to specify the host name of the server and the second control specifies the directory. The ListBox control is populated with the name of the files in that directory.
In this example, the ReadDirectory method is used to return only the name of the file, however it can return additional information such as the file size, date it was last modified, its access permissions and whether or not its a regular file or a subdirectory. For more information, refer to the Technical Reference documentation for this method. |
||
|
Copyright © 2025 Catalyst Development Corporation. All rights reserved. |