Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 06-02-2004
Descendents Descendents is offline
Miembro
 
Registrado: may 2003
Ubicación: Barcelona
Posts: 396
Poder: 22
Descendents Va por buen camino
Busqueda recursiva

Código:
procedure TForm1.BuscaFicheros(path, mask : AnsiString; var Value : TStringList; brec : Boolean);
var 
  srRes : TSearchRec;
  iFound : Integer;
begin 
  if ( brec ) then 
    begin 
    if path[Length(path)] <> '\' then path := path +'\';
    iFound := FindFirst( path + '*.*', faAnyfile, srRes );
    while iFound = 0 do 
      begin 
      if ( srRes.Name <> '.' ) and ( srRes.Name <> '..' ) then 
        if srRes.Attr and faDirectory > 0 then 
          BuscaFicheros( path + srRes.Name, mask, Value, brec );
      iFound := FindNext(srRes);
      end; 
    FindClose(srRes);
    end; 
  if path[Length(path)] <> '\' then path := path +'\';
  iFound := FindFirst(path+mask, faAnyFile-faDirectory, srRes);
  while iFound = 0 do 
    begin 
    if ( srRes.Name <> '.' ) and ( srRes.Name <> '..' ) and ( srRes.Name <> '' ) then 
      Value.Add(path+srRes.Name);
    iFound := FindNext(srRes);
    end; 
  FindClose( srRes );
end;
Esta busqueda recursiva no me acepta busquedas por red.
Si acepta c\aplicacion\
No acepta \\maquina\c\aplicacion\

¿Tengo que cambiar algo en mi código?

Gracias

Saludos
__________________
La victoria tiene cien padres. La derrota es huérfana (Napoleón).
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 13:13:30.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi