Wenns nicht an der listbox liegt hängts entweder an meinem FindAllFiles
Delphi-Quellcode:
function FindAllFiles(RootFolder: string; Mask: string = '*.*'; Recurse: Boolean
= True): TStinDynA;
var
//--Funktionsvariablen---------------------------------------------------------------------
Wn32FiDa: TWin32FindData;
File0001: THandle;
begin
if AnsiLastChar(RootFolder) <> '\' then
begin
RootFolder := RootFolder + '\';
end;
if Recurse then
begin{if-1}
File0001 := FindFirstFile(PChar(RootFolder + '*.*'), Wn32FiDa);
if File0001 <> INVALID_HANDLE_VALUE then
try {try(if-2)}
repeat
if Wn32FiDa.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY=FILE_ATTRIBUTE_DIRECTORY then
begin
if (string(Wn32FiDa.cFileName) <> '.') and (string(Wn32FiDa.cFileName) <> '..')then
begin
FindAllFiles(RootFolder + Wn32FiDa.cFileName, Mask, Recurse);
end;
end;
until FindNextFile(File0001, Wn32FiDa) = False;
finally
windows.FindClose(File0001);
end;{try(if-2)}
end;{if 1}
File0001 := FindFirstFile(PChar(RootFolder + '*.*'), Wn32FiDa);
if File0001 <> INVALID_HANDLE_VALUE then
try {try(if-4)}
repeat
if Wn32FiDa.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY <>
FILE_ATTRIBUTE_DIRECTORY then
begin
gFileCont := length(gFile0001)+1;
Setlength(gFile0001, gFileCont);
gFile0001[gFileCont - 1] := RootFolder + String(Wn32FiDa.cFileName);
end;{if-3}
until FindNextFile(File0001, Wn32FiDa) = False;
finally
Windows.FindClose(File0001);
end;{try(if-4)}
end;{Funktion}
das ich durch
FindAllFiles(EdtCopy0001.Text, '*.*', true);
aufrufe.
oder am Phathdialog den ich benutze um Dateien zu suchen