列举子目录function GetSubFolders(const aFolder:string;aList:TStrings;aAppend:Boolean):Boolean;var findData:TWin32FindData; hFind:THandle; bFind:LongBool;begin Result:=False; hFind:=Windows.FindFirstFile(PChar(aFolder+'/*.*'),findData); if hFind=INVALID_HANDLE_VALUE then Exit; if not aAppend then aList.Clear; bFind:=True; while bFind do begin if findData.cFileName[0]='.' then begin bFind:=Windows.FindNextFile(hFind,findData); Continue; end; if (findData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY)<>0 then aList.Add(aFolder+'/'+findData.cFileName); bFind:=Windows.FindNextFile(hFind,findData); end; Windows.FindClose(hFind);end;