Hi Nigel,
the Problem make this routine, by search to a complete Drive.
Then you must wait, wait and not posibility to terminate :-(
Regards
Klaus
// Return a list of all folders in the "Folder" property and optionally their sub-folders if "IncludeSubFolders" is enabled
function TImageEnFolderMView.GetFolders(ssDest: TStrings): integer;
procedure _AddSubFolders(Folder: string);
var
DirName : WideString;
dir: TIEDirContent;
sNewFolder: String;
begin
Folder := IncludeTrailingBackslash( Folder );
dir := TIEDirContent.Create( Folder + '*.*' );
try
while dir.GetItem( DirName, False, True, fShowHiddenFiles ) do
begin
sNewFolder := IncludeTrailingBackslash( Folder + DirName );
if (ssDest.IndexOf( sNewFolder ) = -1) then
ssDest.Add( sNewFolder );
_AddSubFolders( sNewFolder );
end;
finally
dir.Free;
end;
end;
Klaus
www.klausdoege.de