Opening Directories

The first parameter of the OpenDirectory method is required to be present. If it is an empty string ("" in Visual Basic), it will be interpreted as the current directory. In general, it may be a path name. It may specify a subset of files in a directory by use of a file mask.

Examples:

' Generate a listing for the current directory
FileTransfer1.OpenDirectory ""

' Generate a listing for a specified directory
FileTransfer1.OpenDirectory "/usr/myDirectory"

' Generate a listing for files in the current directory
FileTransfer1.OpenDirectory "*.txt"

Some FTP servers do not properly implement the generation of a file listing for a specified path, but can only deal with the current directory. If ReadDirectory returns improper results, try setting the current directory to the desired directory before OpenDirectory:

FileTransfer1.ChangeDirectory "/usr/myDirectory"
FileTransfer1.OpenDirectory ""


Copyright © 2008 Catalyst Development Corporation. All rights reserved.