Board index » delphi » files attributes

files attributes

Hello ALL!

Explain me, please, how I can to delete all attributes of file...
Why I can't to do it with standart SetFAttr??
Explain me, please...!

If you can, more better via email...
--
SY
Dmitry DAC
d...@trk.aip.nikolaev.ua         2:466/7.56
ICQ 9663543

 

Re:files attributes


Quote
Dmitry wrote:

> Hello ALL!

> Explain me, please, how I can to delete all attributes of file...
> Why I can't to do it with standart SetFAttr??
> Explain me, please...!

See if this procedure does what you need. (note: I haven't tried to
compile it yet, but this should give you the basic idea)

Procedure ChangeAttribute;

var
  Attribute : word;
  FileToDelete : text;

begin
  {$I-}
    assign (FileToDelete,{* your_file_name_goes_here*});
    reset (FileToDelete);
  {$I+}

  getfattr (FileToDelete,Attribute);            {get current attributes}
  setfattr (FileToDelete,Attribute AND $3E);    {turn off ALL
attributes}

end;

--

Regards,
Jim Wilson

Other Threads