
Returns file attributes.
FileAttrGet (filename)
(s) filename file whose attributes you want to determine.
(s) attribute settings.
Returns attributes for the specified file, in a string of the form "RASH". This string is composed of four individual attribute characters, as follows:
|
Symbol Meaning |
Symbol Meaning |
|
R read only ON |
- read only OFF |
A hyphen in any of these positions indicates that the specified attribute is OFF. For example, the string "-A-H" indicates a file which has the Archive and Hidden attributes set.
This function supports extended-length path names.
editfile = StrCat(DirWindows(0),"win.ini")
attr = FileAttrGet(editfile)
If StrSub(attr, 1, 1) == "R"
Message("File is read-only", "Cannot edit %editfile%")
Else
DirChange(DirWindows(0))
Run("notepad.exe", editfile)
EndIf