Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Busqueda recursiva (https://www.clubdelphi.com/foros/showthread.php?t=7181)

Descendents 06-02-2004 17:21:21

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

delphi.com.ar 06-02-2004 17:34:29

Te comento que lo probé con direcciones UNC y aparenta funcionar... ¿Cuál es el problema?

Descendents 06-02-2004 17:40:19

El problema más que de la programación era de la tarjeta de red de mi equipo.Que he visto que me falla y en otro equipo el código funciona.

Perdón y Gracias


La franja horaria es GMT +2. Ahora son las 23:25:26.

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