Xceed FTP Library Documentation
Getting a remote folder's contents
Getting Started Quickly > Getting a remote folder's contents

Introduction

There are two ways of using the XceedFtp control to obtain the listing of a remote folder's contents. The first way is to use the ListFolderContents method, which will cause the ListingFolderItem event to be triggered for each item in the remote folder, thus providing your application with information on each item separately. The second way is to use the GetFolderContents method, which returns an XceedFtpFolderItems collection object that contains the directory listing items. The second method is preferable in environments such as ASP pages which do not support events.

This topic describes the GetFolderContents method. See the Listing a remote folder's contents topic for help with the ListFolderContents method.

Basic retrieval of a remote folder's contents (GetFolderContents method)

To list the files on an FTP server, you need to perform the following steps. Put an XceedFtp control on a form, or instantiate it dynamically, then:

Other things you should consider