DirectoryFormat Property  
 

Gets and sets the current directory format type.

Syntax

object.DirectoryFormat [= format ]

Remarks

The DirectoryFormat property specifies the format of a directory listing used by a FTP server. The directory format types supported are:

Value Constant Description
0 ftpDirectoryAuto This value specifies that the control should automatically determine the format of the file lists returned by the server. It is recommended that most applications use this value and allow the control to automatically determine the appropriate file listing format used by the server.
1 ftpDirectoryUNIX This value specifies that the server returns file lists in the format commonly used by UNIX servers. Note that many servers can be configured to return file listings in this format, even if they are not actually a UNIX based platform. Consult the technical reference documentation for your server for more information.
2 ftpDirectoryMSDOS This value specifies that the server returns file lists in the format commonly used by MS-DOS based systems. This includes Windows IIS servers. Long file names will be returned if supported by the underlying filesystem, such as NTFS or FAT32.
3 ftpDirectoryVMS This value specifies that the server returns file lists in the format commonly used by VMS servers. Note that VMS servers can be configured to return a standard UNIX style listing in additional to the default VMS format.
4 ftpDirectorySterling1 This value specifies that the server returns file listings in a proprietary format used by the Sterling server, which is used for EDI (Electronic Data Interchange) applications. This format uses a 13 byte status code.
5 ftpDirectorySterling2 This value specifies that the server returns file listings in a proprietary format used by the Sterling server, which is used for EDI (Electronic Data Interchange) applications. This format uses a 10 byte status code.
6 ftpDirectoryNetWare This value specifies that the server returns file listings in a proprietary format used by NetWare servers. The format is similar to UNIX style listings except that file access and permissions are indicated by letter codes enclosed in brackets. This is the default format selected if the server identifies itself as a NetWare system.
7 ftpDirectoryMLSD This value specifies that the server should return file listings in a machine-independent format as defined by RFC 3659. This format specifies file information as a sequence of name/value pairs, with the same format being used regardless of the operating system that the server is hosted on. Note that not all servers support this format, and some proxy servers may reject the command even if the remote server supports its use.

This property should only be set if the control cannot automatically determine the directory format returned by the server. The default directory format is determined both by the server's operating system and by analyzing the format of the data returned by the server. If the control is unable to automatically determine the format, it will attempt to parse the list of files as though it is a UNIX style listing.

If this property is set to the default value ftpDirectoryAuto and the control can determine from the format of the file listing returned by the server, then the property will change value upon the first call to the ReadDirectory method or the first time the FileList event is generated.

Data Type

Integer (Int32)

See Also

System Property, ReadDirectory Method, FileList Event