The OpenDirectory method opens the specified directory on
the server so that the list of files in that directory may be
read.
The optional DirName argument specifies the directory on
the remote server. If it is an empty string, it designates the
current remote directory. It may also be a file mask that includes
wildcards if supported by the server. If this argument is omitted,
then the current working directory will be opened.
The optional ParseList argument, whose allowable values
are True and False, controls whether the directory listing will be
parsed as it is read. The default value is True. If
ParseList is False, then each entire un-parsed line of a
directory listing will be returned in the FileName parameter
of the ReadDirectory method, and all other output parameters
will be blank.
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.
Note that you must call the CloseDirectory method after
the list of files has been returned by the server. Failure to do so
will result in an error when you attempt to transfer a file because
the data channel to the server has been left open. For this same
reason, you cannot call the GetFile or PutFile
methods while reading the contents of a directory on the
server.
nError = FileTransfer1.OpenDirectory(strDirName)
nError = FileTransfer1.OpenDirectory()
nError = FileTransfer1.OpenDirectory("",False)
nError = FileTransfer1.OpenDirectory("*.exe")