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
  #7  
Antiguo 01-03-2012
Paulao Paulao is offline
Miembro
 
Registrado: sep 2003
Ubicación: Rua D 31 Casa 1 - Inhoaíba - Rio de Janeiro - RJ - Brasil
Posts: 637
Poder: 21
Paulao Va por buen camino
Perdon, mi olvide de postar el codigo. Abajo el codigo.
Código Delphi [-]
function TForm1.TextFoundInFile(path: string; const FileMask:string; const tipo, tabela: string): TStrings;
var
  SR: TSearchRec;
  txt: TextFile;
  Row: string;
  Found: Boolean;
  i: Integer;
  NroExt: TStrings;
begin
  NroExt:= TStringList.Create;
  try
    NroExt.Delimiter:= ';';
    NroExt.DelimitedText:= FileMask;
    path := IncludeTrailingPathDelimiter(path);
    Result := TStringList.Create;
    for i:= 0 to NroExt.Count - 1 do
    begin
      if FindFirst(path + NroExt[i], faAnyFile - faDirectory, SR) = 0 then
        repeat
          AssignFile(txt,path + SR.Name);
          Reset(txt);
          Found:= False;
          while not Eof(txt) and not Found do
          begin
            Readln(txt, Row);
            if Pos(tabela, Row) > 0 then
            begin
              Application.ProcessMessages;
              Result.Add(tipo + ';' + tabela + ';' + SR.Name);
              //CheckListBox1.Items.Add(tipo + ' - ' + tabela + ' - ' + SR.Name);
              ListBox1.Items.Add(tipo + ' - ' + tabela + ' - ' + SR.Name);
              Found:= True
            end
          end;
          CloseFile(txt);
        until FindNext(SR) <> 0
    end
  finally
    NroExt.Free;
  end;
end;

y abajo la llamada a este metodo.
Código Delphi [-]
procedure TForm1.VarrerClick(Sender: TObject);
begin
  ClientDataSet1.Open;
  pth := IncludeTrailingPathDelimiter(edtDir.Directory);
  while not ClientDataSet1.Eof do
  begin
    //TextFoundInFile(pth,'*.pas;*.dfm',ClientDataSet1.FieldByName('xtype').AsString,ClientDataSet1.FieldB  yName('name').AsString).SaveToFile('D:\Teste\LISTA.txt');
    TextFoundInFile(pth,'*.pas;*.dfm',ClientDataSet1.FieldByName('xtype').AsString,ClientDataSet1.FieldB  yName('name').AsString);
    ClientDataSet1.Next;
  end;
end;
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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
checklistbox y pagecontrol para usarlo dockeable asdbernardo Varios 8 26-10-2011 18:52:15
ayuda para exportar query a excel microbiano Varios 5 19-09-2011 22:49:22
Componente para exportar a Excel en Delphi 2007 Bertifox2008 Internet 3 21-08-2008 16:39:19
Exportar a Excel Danielle Impresión 0 16-06-2006 18:04:55
Necesito un componente para Exportar a Excel,Word,Pdf y HTML!! Maxsteel73 Impresión 1 24-04-2006 01:57:56


La franja horaria es GMT +2. Ahora son las 20:24:18.


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