FileList Method  
 

Request a list of files in the specified directory. This method has been deprecated and should no longer be used in new applications.

Syntax

object.FileList( RemotePath, Options )

Parameters

RemotePath
A string which specifies the name of a directory on the server. The list of files and subdirectories in that directory will be returned to the client.
Options
A numeric value which specifies how the list of files should be returned by the server. It may be one of the following values:
Value Constant Description
0 ftpListDefault This option specifies that the server should return a complete file list, providing all of the information available about that file. This typically includes the date and time the file was last modified, the size of the file and access rights. This option is the default, and will be used if the argument is omitted from the method call.
1 ftpListNameOnly This option specifies that the server should only return a list of file names, with no additional information. This option may be used if the server returns the file listing in a format that is not recognized by the control.

Return Value

A value of zero is returned if the operation was successful, otherwise a non-zero error code is returned which indicates the cause of the failure.

Remarks

The FileList method instructs the server to return a list of files in the specified directory. The file listing is returned on the data channel and may be read using the Read method. When the complete file listing has been read, the application must call the CloseDirectory method to close the data channel. This enables an application to read and process the file listing as it sent from the server, and can be useful if the server returns the file list in a format that is not recognized by the control.

To have the control automatically parse the list of files returned by the server, set the ParseList property to True. This will cause the OnFileList event to fire for each file in the directory. The control recognizes formats typically used with UNIX, VMS and Windows based operating systems.

This method has been deprecated and cannot be used to obtain file listings from servers using the SSH protocol. To obtain an unparsed list of files, it is recommended that you use the GetFileList method.

See Also

ParseList Property, CloseDirectory Method, GetFileList Method, GetFileStatus Method, OpenDirectory Method, ReadDirectory Method, FileList Event