Xbasic

FILE.ATTRIBUTES_GET Function

Syntax

Attributes as C = FILE.Attributes_Get(C filename)

Arguments

filenameCharacter

A fully qualified file name.

Returns

AttributesCharacter

Returns a list of file attribute flags for the specified file. Use the FILE.EXISTS Function to determine whether or not the file exists.

Description

Returns A list of file attribute flags for the file.

Discussion

The FILE.ATTRIBUTES_GET() method gets the attributes of Filename. Attributes is a string that contains "R" if the file is read-only, "H" if the file is hidden, "A" if the file has its archive bit turned on.

Example

? file.attributes_get("C:\Form_Methods.Txt")
= "A"
On Windows 2000 NTFS volumes, an attribute can be set for directories and files, so that the directories and files are not indexed by the Windows 2000 Indexing Service. In this case the Attribute will be shown as "X"

See Also