hm na ich hatte es so mal gefunden !!
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78:
| var p:string; begin SelectDirectory('Bitte Ordner wählen.', '',p); if p = '' then p := 'C:\'; edit1.Text:=p;
implementation
Type TLogFunct = Function( Const path: String; Const SRec: TSearchRec ) : Boolean of Object;
Procedure FindRecursive( Const path: String; Const mask: String; LogFunction: TLogFunct ); Var fullpath: String; Function Recurse ( Var path: String; Const mask: String) : Boolean; Var SRec: TSearchRec; retval: Integer; oldlen: Integer; Begin screen.Cursor:=crhourglass; Recurse := True;
oldlen := Length( path ); retval := FindFirst( path+mask, faAnyFile, SRec ); While retval = 0 Do Begin application.ProcessMessages; If (SRec.Attr and (faDirectory or faVolumeID)) = 0 Then If not LogFunction( path, SRec ) Then Begin Result := False; Break; End;
retval := FindNext( SRec ); End; FindClose( SRec ); If not Result Then Exit;
End; Begin If path = '' Then GetDir(0, fullpath) Else fullpath := path; If fullpath[Length(fullpath)] <> '\' Then fullpath := fullpath + '\'; If mask = '' Then Recurse( fullpath, '*.*' ) Else Recurse( fullpath, mask ); screen.cursor:=crdefault; End; |
nun wollte ich das auch wieder verwenden aber leider zeigt er wie gesagt nocht die exe datei nachher an!!
Mfg Luke Sky.
Moderiert von
raziel: Delphi-Tags hinzugefügt