Hola Nora, bienvenida al club.
Puedes usar esto que está en la ayuda de Delphi
Código Delphi
[-]procedure TForm1.BitBtn1Click(Sender: TObject);
var
Attributes, NewAttributes: Word;
begin
with FileAttrForm do
begin
FileDirName.Caption := FileList.Items[FileList.ItemIndex];
PathName.Caption := FileList.Directory;
ChangeDate.Caption :=
DateTimeToStr(FileDateTime(FileList.FileName));
Attributes := FileGetAttr(FileDirName.Caption);
ReadOnly.Checked := (Attributes and faReadOnly) = faReadOnly;
Archive.Checked := (Attributes and faArchive) = faArchive;
System.Checked := (Attributes and faSysFile) = faSysFile;
Hidden.Checked := (Attributes and faHidden) = faHidden;
if ShowModal <> id_Cancel then
begin
NewAttributes := Attributes;
if ReadOnly.Checked then
NewAttributes := NewAttributes or faReadOnly
else
NewAttributes := NewAttributes and not faReadOnly;
if Archive.Checked then
NewAttributes := NewAttributes or faArchive
else
NewAttributes := NewAttributes and not faArchive;
if System.Checked then
NewAttributes := NewAttributes or faSysFile
else
NewAttributes := NewAttributes and not faSysFile;
if Hidden.Checked then
NewAttributes := NewAttributes or faHidden
else
NewAttributes := NewAttributes and not faHidden;
if NewAttributes <> Attributes then
FileSetAttr(FileDirName.Caption, NewAttributes);
end;
end;
end;
Salud OS