Hello,
(Lazarus 1.4.0 / pfc 2.6.4 / Windows Embedded Handheld 6.5 Professional (CE OS 5.2.29153)
I have the following code:
<code>
if SysUtils.FindFirst(fLogDir + '*.*', faAnyFile and not faDirectory, sr) = 0 then
repeat
FileAge(fLogDir + sr.Name, dt);
if DaysBetween(Now, dt) > AAge then
begin
DeleteFile(PWideChar(fLogDir + sr.Name));
--log fLogDir + sr.Name --here
end;
until SysUtils.FindNext(sr) <> 0;
SysUtils.FindClose(sr);
</code>
In the log line al file older the 10 days are shown, but none is deleted. When i use FileExists, the file exists. I can delete the files manualy
I read and tested UTFToAnsi conversion, that didn't help.
can anyone help me on this?
Thanks in advance
Herman