dure scanDisk1(const path:AnsiString); const {$IFDEF UNIX} pattern = '*'; {$ELSE} pattern = '*.*'; {$ENDIF} var SRec:TSearchRec; Err:Integer; begin Err:=FindFirst(path+pattern,faAnyFile {$IFDEF UNIX}+ faSymLink{$ENDIF},SRec); while Err=0 do begin if (SRec.Attr and faDirectory)=faDirectory then begin {$IFDEF UNIX} if SRec.mode and 61440 = 40960 then begin Err:=FindNext(SRec); Continue; end; {$ENDIF} if (SRec.Name='.') then begin end else if (SRec.Name='..') then begin end else // recursive: {$IFDEF UNIX} scanDisk1(path+SRec.Name+'/'); {$ELSE} scanDisk1(path+SRec.Name+'\'); {$ENDIF} end else begin System.Writeln(Path+SRec.Name); end; Err:=FindNext(SRec); End; FindClose(SRec); end;