Siebel VB Language Reference > VB Language Reference >

GetAttr Function


This standard VB function returns the attributes of a file, folder, or volume label.

Syntax

GetAttr(pathname)

Argument
Description

pathname

A string or string expression evaluating to the name of the file, folder, or volume label to query

Returns

An integer representing a file attribute. The file attributes returned by GetAttr are as follows:

Value
Meaning

0

Normal file

1

Read-only file

2

Hidden file

4

System file

8

Volume label

16

Directory (folder)

32

Archive—file has changed since last backup

Usage

Pathname can contain drive and folder information, but cannot contain wildcards (* and ?).

If GetAttr returns a value other than those in the preceding list, the return value represents the sum of the return values for those attributes that are set; thus, for example, a return value of 6 represents a hidden system file.

Related Topics

FileAttr Function
SetAttr Statement

Siebel VB Language Reference Copyright © 2006, Oracle. All rights reserved.