Hola.
Código Delphi
[-]
procedure SubCarpetas(Ruta: string; TS: TStrings);
var
SR: TSearchRec;
begin
Ruta := InCludeTrailingPathDelimiter(Ruta) + '*.*';
if FindFirst(Ruta, $10, SR) = 0 then
repeat
if (SR.Name[1] <> '.')and(SR.Attr = $10) then
TS.Add(SR.Name);
until FindNext(SR) <> 0;
FindClose(SR);
end;
Llamada:
Código Delphi
[-]
SubCarpetas('C:\WINDOWS\', ListBox1.Items);
También podrías usar el componente
TDirectoryListBox...
Saludos.