Henry Olive 5 Posted 5 hours ago Good Day I asked a similiar question while ago According to that replies i made below proc In my proc HIDDEN and NORMAL works but READONLY doesnt work even though i dont get any err.msg. what am i doing wrong ? Thank You procedure TFolders.RG1Click(Sender: TObject); var Attr : TFileAttributes; FolderPath : String; begin FolderPath:= CDS1FOLDERPATH.AsString; Attr:= TPath.GetAttributes(PChar(FolderPath)); if not TDirectory.Exists(FolderPath) then begin ShowMessage(FolderPath + ' not Exist'); Abort; end; if RG1.ItemIndex = 0 then // Read Only - RG1 = Radio Group SetFileAttributes(PChar(FolderPath), FILE_ATTRIBUTE_READONLY) else if RG1.ItemIndex = 1 then // Hidden SetFileAttributes(PChar(FolderPath), FILE_ATTRIBUTE_HIDDEN) else if RG1.ItemIndex = 2 then // Open (Not Read Only - Not Hidden) SetFileAttributes(PChar(FolderPath), FILE_ATTRIBUTE_NORMAL); end; Share this post Link to post