Monday, October 11, 2010

Visual Basic File System Statement : SetAttr

Purpose : The SetAttr Statement sets the attribut information for DOD files.

Syntax :
SetAttr filename$ , attrbuteBits%

SetAttr "MYFILE.TMP" , vbReadOnly , vbSystem

All file , directories and volumes have an attribute byte associated with then. This information indicates whether the filename is normal, read-only, hidden, system a volume label, a directory, or has been modified since the last backup.

Constants used with the SetAttr function
Constant : Value : Description
vbNormal : 0 : Normal
vbReadOnly : 1 : Read-Only
vbHidden : 2 : Hidden
vbSystem : 4 : System file
vbDirectory : 16 : Directory
vbArchive : 32 : File has changed since last backup

No comments:

Post a Comment