Mirror

How to change file attributes (Views: 101)


Problem/Question/Abstract:

How do I change the attributes of a file like write protection, hidden etc. ?

Answer:

var
  F_Attr: Word;

F_Attr := FileGetAttr('MyFile');

{Turn ReadOnly OFF}
FileSetAttr('MyFile', F_Attr and not faReadOnly);

<< Back to main page