DIR:File:Attribute:Change
Changes the attributes of a file
DIR:File:Attribute:Change
Defined In: DIR.NLM
Service: NetBasic
<bSuccess> = DIR:File:Attribute:Change (<sTargetFile>, <iAttr>)
Boolean
Changes the attributes of file <sTargetFile>. <sTargetFile> is either the full path name of the file or the name of the file in the current directory. <iAttr> is the attribute to be changed. Permissible integer values are:
1 Read-only 2 Hidden 4 System 8 Execute-only 32 Archive 128 Sharable 4096 Transaction 16384 Read Audit 32768 Write Audit 65536 Immediate Purge 524288 Copy Inhibit 131072 Rename Inhibit 262144 Delete Inhibit 33554432 Immediate Compression 134217728 Don't Compress
NOTE Include the DIR.H file in the program to use the DIR constant names (see DIR Constants).
If (!DIR:File:Attribute:Change ("AUTOEXEC.NLM", 32 + 128))
Print ("Error flagging to archive & sharable"); Newline
EndIf