ja genau das ist ja das Problem. Wenn ich den
UNC-Namen eingebe, passiert einfach nichts.
Kein Fehler, kein nichts...
Folgende Funktion zum Listen der Dateien / ORdner:
Delphi-Quellcode:
procedure FindAllFiles(FileList: TStrings; RootFolder: string; Mask: string ='*'; Recurse: Boolean = True; AddFolderNames: Boolean = False; IgnoreMaskAtFolderNames: Boolean = True);
procedure LFindAllFiles(AParentFolder: String);
var LSearchRec: TSearchRec;
begin
if FindFirst(AParentFolder + '*', faAnyFile, LSearchRec) = 0 then
begin
repeat
if (LSearchRec.Name <> '.') and (LSearchRec.Name <> '..') then
begin
if LSearchRec.Attr and faDirectory = faDirectory then
begin
if AddFolderNames and
(IgnoreMaskAtFolderNames or Like(AnsiLowerCase(LSearchRec.Name), Mask)) then
FileList.AddObject(AParentFolder + LSearchRec.Name, TObject(True));
if Recurse then
LFindAllFiles(AParentFolder + LSearchRec.Name + '\');
end
else if Like(AnsiLowerCase(LSearchRec.Name), Mask) then
FileList.AddObject(AParentFolder + LSearchRec.Name, TObject(False));
end;
until FindNext(LSearchRec) <> 0;
FindClose(LSearchRec);
end;
end;
begin
Mask := AnsiLowerCase(Mask);
LFindAllFiles(IncludeTrailingPathDelimiter(RootFolder));
end;