From: "Garth S. Wilcox" Subject: Re: File-Attributes Date: 01 Jan 2000 00:00:00 GMT Message-ID: <84lt0j$8p32@bornews.borland.com> References: <386CC828.F9F3C94@bluewin.ch> Organization: Inprise/Borland International X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: borland.public.delphi.students The following is a code snippet that removes the read only attribute. AOutFile is a string containing the fully qualified filename var Attributes : integer; begin Attributes := FileGetAttr( AOutfile); if (Attributes AND faReadOnly) = faReadOnly then begin FileSetAttr( AOutfile, Attributes and not faReadOnly); end; end; Have fun. Michael Schmid wrote in message <386CC828.F9F3C94@bluewin.ch>... >my problem is really simply, i would like to delete a file and a >directory..... >this part wirks ALMOST perfectly. It doesn't work if the file is >protected with the >attribute "faReadOnly". I tried everything to change the attributes >during the code. >But it doesn't work. I tried it with FileSetAttr, typ TsearchRec and >findfirst.... >can somebody help me???? >thanks a lot > >Michael