<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><div>> Fred, the tiSetFileReadOnly() I sent you the other day already uses<br>> fpstat() before checking/setting the read-only flag. So you are halfway<br>> there. ;-)<br><br>Yep, many thanks. ;-)<br><br>PS: Bart's tip works like lovely charm... =><br><br>function FileIsExecutable(const AFilename: string): boolean;
<br>var
<br> Info : Stat;
<br>begin
<br> // first check AFilename is not a directory and then check if executable
<br> Result:= (FpStat(AFilename,info{%H-})<>-1) and FPS_ISREG(info.st_mode) and
<br> (BaseUnix.FpAccess(AFilename,BaseUnix.X_OK)=0);
<br>end;
<br><br>Fre;D<br></div> </div></body>
</html>