I know that the following code doesn't use Try/Finally or create/free a Tstringlist.
It is just a simple example to get my question across.
The procedure below finds only 1345 *.txt files on my C: drive
but the excellent freeware program "Everything" finds 2232 *.txt files there.
Investigation finds that my code can not parse certain folders on my drive.
I assume that this is because of "Permissions". I have tried running the
executable outside of Lazarus "as admin", with no help.
HOW CAN I LIST ALL 2232 FILES ON MY C: DRIVE LIKE "EVERYTHING" DOES?
Latest Laz/FPC release, Win 11
procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.Lines := FindAllFiles('.\C:\', '*.txt', True);
end;
Thank You