Autor Beitrag
meg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 24

Win XP Prof.
D6, D2005 Peronal, Turbo Delphi
BeitragVerfasst: Mo 17.04.06 22:40 
folgende Prozedur sollte eigentlich Ordner suchen
und die vor allem auch in den Unterordner fortsetzen
nur irgendwie funzt des nicht

hier ist mal das was ich bis jetzt hab
ausblenden Delphi-Quelltext
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:
procedure TForm1.OrdnerSuchen(OrdnerName, SuchPfad: String);
var
 sr:TSearchRec;
begin
  if (SuchPfad<>'') and (SuchPfad[Length(SuchPfad)]<>'\') then
    SuchPfad:=SuchPfad+'\';
  if (FindFirst(SuchPfad + '*.*', faDirectory, sr)=0) then
  begin
    repeat
      begin
      if (sr.Name<>'.') and (sr.Name<>'..') and (faDirectory = (sr.attr and faDirectory)) then
      begin
        list_resluts('dictionary.bmp', sr.Name, SuchPfad);
        Label16.Caption := IntToStr(zaehler + 1);
      end;
    until FindNext(sr)<>0;
    FindClose(sr);
  end;
  //Unterverzeichniss durchsuchen
    if (FindFirst(SuchPfad + '\' + sr.Name +'*.*', faDirectory, sr)=0) then
    begin
      repeat
      begin
        if (sr.Name<>'.') and (sr.Name<>'..') then
          OrdnerSuchen(OrdnerName, SuchPfad + '\' + sr.Name);
      end
      until FindNext(sr)<>0;
       FindClose(sr);
  end;
end;


vielleicht kann mir jemand sagen wo der Fehler ist


Moderiert von user profile iconChristian S.: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Mi 19.04.2006 um 18:46
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 17.04.06 23:47 
Moin!

Hier habe ich mal eine Funktion zum Suchen von Verzeichnissen auf Basis von Luckies DriveTools erstellt. Vielleicht hilft dir das weiter, schau mal in den Quelltext. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
meg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 24

Win XP Prof.
D6, D2005 Peronal, Turbo Delphi
BeitragVerfasst: Mi 19.04.06 09:19 
danke habs gescafft funzt jetzt
rd3
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 19.04.06 10:06 
Ansonsten einfach die Jedi-Komponenten benutzen:
jvcl.sourceforge.net
Die machen das auch...