wodFtpDLX ActiveX Control - ListDir Method
      
 

Description

Lists contents of a directory on the server.


Return Type

None  


Syntax

object.ListDir [RemotePath]



The ListDir Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodFtpDLX.
RemotePath Optional. A Variant value. Full path to a directory on the server.

Remarks

ListDir method will send request to the server to retrieve FULL listing of a directory, given by RemotePath argument. Once server sends data, ListItems event will be fired containing all the file listed by the server - each one in separate line, split by CRLF sequence. If server supports MLSD/MLST extensions, this command will send MLSD. If those extensions are not supported, LIST command is sent (in FTP protocol).

Once completed, Done event will be fired. If no error occurs, ErrorCode argument in Done event will be set to 0 (zero). If error occurred, ErrorCode will hold number for the error, and ErrorText will contain description for the error. You can use DirItems property to access parsed collection of items from listed directory.

To get only filenames (and directory names) for specific path, you can use ListNames method.

No wildcards can be used for RemotePath argument. RFC protocol specifications for FTP and SFTP do not allow them.

Do not forget that RemotePath should always specify full absolute path (i.e. /home/joe/something) instead of relative path (i.e. joe/something).