I looked high and low for this, but in the end found the cause of it all. I didn't close a Find in the folders. Putting a try..finally in the code did the trick. This guaranteed closing the Find, no matter what. So, if you experience that folders are kept in use, go look for this one.
procedure foo;
var
sr: TSearchRec;
ok: boolean;
begin
ok := (FindFirst('*.*', faAnyFile, sr)=0);
try
while ok do
begin
goDoSomething();
ok := (FindNext(sr)=0);
end;
finally
FindClose(sr);
end;
end;
Bye,
Bart