Ver Mensaje Individual
  #3  
Antiguo 05-10-2017
SaraTorres SaraTorres is offline
Miembro
 
Registrado: sep 2017
Posts: 25
Reputación: 0
SaraTorres Va por buen camino
Cita:
Empezado por AgustinOrtu Ver Mensaje
Hola SaraTorres, faltan algunos datos para poder identificar el problema. No podrias copiar y pegar el procedimiento en donde invocas esta linea
Este es el código original que encontré:
Lo que necesito es saber cómo llamar esta procedure. Muchas gracias

Código Delphi [-]
procedure FindFiles(StartDir, FileMask: string; recursively: boolean; var FilesList: TStringList);
  const
    MASK_ALL_FILES = '*.*';
    CHAR_POINT = '.';
  var
    SR: TSearchRec;
    DirList: TStringList;
    IsFound: Boolean;
    i: integer;
  begin
    if (StartDir[length(StartDir)] <> '\') then begin
      StartDir := StartDir + '\';
    end;
 
    IsFound := FindFirst(StartDir + FileMask, faAnyFile - faDirectory, SR) = 0;

    while IsFound do  begin
      FilesList.Add(StartDir + SR.Name);
      IsFound := FindNext(SR) = 0;
    end;
 
    FindClose(SR);
 
    if (recursively) then begin
      DirList := TStringList.Create;
      try
        IsFound := FindFirst(StartDir + MASK_ALL_FILES, faAnyFile, SR) = 0;
        while IsFound do
        begin
          if ((SR.Attr and faDirectory) <> 0) and
            (SR.Name[1] <> CHAR_POINT) then
            DirList.Add(StartDir + SR.Name);
          IsFound := FindNext(SR) = 0;
        end;
        FindClose(SR);
 
        for i := 0 to DirList.Count - 1 do
          FindFiles(DirList[i], FileMask, recursively, FilesList);
      finally
        DirList.Free;
      end;
    end;
  end;
Responder Con Cita