Ver Mensaje Individual
  #10  
Antiguo 01-12-2005
[Gunman] [Gunman] is offline
Miembro
 
Registrado: dic 2004
Ubicación: Pedreguer.
Posts: 355
Reputación: 20
[Gunman] Va por buen camino
Ya he solucionado el problema, muchas gracias. Una vez más ha sido culpa mia. Pongo aquí el código para que se muestren TODAS las carpetas (pero no los archivos):
Código Delphi [-]
  procedure TForm1.GetFolders(CurrLocalPath: String);
  var
     SearchRec: TSearchRec;
 begin
   TreeView.Items.Clear;
 
   SearchRec.ExcludeAttr := 32; 
   if FindFirst(IncludeTrailingPathDelimiter(CurrLocalPath)+'*.*', faAnyFile,
      SearchRec) = 0 then
       repeat
       if (SearchRec.Attr and faDirectory) = faDirectory) then
         TreeView.Items.Add(nil,SearchRec.Name);
     until FindNext(SearchRec) <> 0;
     FindClose(SearchRec);
 end;
No funcionaba porque habia mezclado vuestros dos códigos:
Código Delphi [-]
       {...}
 if (SearchRec.Attr and faDirectory) <> {<- aquí estaba el problema, sólo         
 mostraba los archivos, XDDDD, que estúpido} faDirectory) then
       {...}
Muchas gracias a todos los que habeis respondido y a Nailuj y Thread de #Delphi.
__________________
l2prog.co.nr
Responder Con Cita