Autor Beitrag
Wolle92
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Mi 25.07.07 09:26 
Hallo,

mein FTP-Client soll die Dateien in einem ListView auflisten, was aber nicht so ganz funktioniert, kann mir jemand den Fehler sagen?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
procedure TForm1.FindFiles(Path: String);//Als Path wird ShellTreeView1.Path übergeben
var sr: TSearchRec;
    r: Integer;
begin
  r := FindFirst(Path, faAnyFile, sr);
  while r = 0 do
  begin
    if sr.Name <> '.' then
      ListView1.Items.Add.Caption := sr.Name;
    Application.ProcessMessages;
    r := FindNext(sr);
  end;
  FindClose(sr);
end;
Andreas Schilling
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128
Erhaltene Danke: 1

WIN XP, WIN 7
Delphi 5 Ent, Delphi 2007 Pro, XE4
BeitragVerfasst: Mi 25.07.07 10:18 
Aus der Delphihilfe
Zitat:

Der Konstantenparameter Path enthält das Verzeichnis und die Dateinamensmaske. Es können auch Platzhalterzeichen verwendet werden. So bezeichnet beispielsweise 'c:\test\*.*' alle Dateien im Verzeichnis C:\TEST.
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Mi 25.07.07 10:39 
oh... hätt ich auch selbst drauf kommen können...