[edit] dat alte war Mist (besser lesen sollte ._.)
Delphi-Quellcode:
// faVolumeID = 8
function IsEmptyFolder(const AsFolder : string) : boolean;
var
sr : TSearchRec;
begin
Result := FindFirst(AsFolder+'\*.*',faAnyFile,sr) = 0;
if not Result then exit;
repeat
if (sr.Name <> '.') and (sr.Name <> '..') and (sr.Attr and faVolumeID = 0) then
begin
Result := false;
Break;
end;
until FindNext(sr) <> 0;
FindClose(sr);
end;