Xceed FTP Library Documentation
Getting Started Quickly / Listing a remote folder's contents
In This Topic
    Listing a remote folder's contents
    In This Topic

    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 ListFolderContents method. See the Getting a remote folder's contents topic for help with the GetFolderContents method.

    Basic listing of a remote folder's contents (ListFolderContents 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