Ver Mensaje Individual
  #6  
Antiguo 13-03-2015
gdlrinfo gdlrinfo is offline
Miembro
 
Registrado: may 2007
Posts: 131
Reputación: 20
gdlrinfo Va por buen camino
gRACIASS

Amigos gracias por la ayuda al final hice dos procesos para todo uno el que me paso el amigo duilioisola que me sirvió de mucho y después generalice todo lo otro en otro mas aquí dejo el ejemplo por si alguien le sirve y muchas gracias como siempre por su ayudaaaaa... Abrazooossss...

Código Delphi [-]
Procedure Llamar(obra, a, nombre:string);
begin
   InputQuery('Presentación', 'Escriba la Presentación AAAAMMP:', a);
   if DirectoryExists(obra+'\'+a+'\ADEM\')=True then
    Begin
      Comprimir( obra+'\'+a+'\ADEM\', '*.Txt', obra+'\'+a+'\ADEM\'+nombre+a+'.zip');
      Chdir(obra+'\'+a+'\ADEM\');
      WinExec('cmd /cRename *.lis *.txt', SW_SHOW);
      WinExec('cmd /cpdfcreator /pf"*.txt"', SW_SHOW);
      ShowMessage('No des Ok hasta que termine el PDF');
      CopiaTodo('C:\*.pdf', obra+a+'\ADEM\');
      chdir('C:');
      WinExec('cmd /cdel *.pdf', SW_SHOW)  ;
      Chdir(obra+'\'+a+'\ADEM\');
      WinExec('cmd /cdel *.txt', SW_SHOW);
      Comprimir(obra+'\'+a+'\ADEM\', '*.PDF', obra+'\'+a+'\ADEM\'+nombre+a+'.zip');
      Chdir(obra+'\'+a+'\ADEM\');
      WinExec('cmd /cdel *.pdf', SW_SHOW);
    End;
    if DirectoryExists(obra+'\'+a+'\DISPROFA\')=True then
      Begin
        Comprimir( obra+'\'+a+'\DISPROFA\', '*.Txt', obra+'\'+a+'\DISPROFA\'+nombre+a+'.zip');
        Chdir(obra+'\'+a+'\DISPROFA\');
        WinExec('cmd /cdel *.txt', SW_SHOW)  ;
      End;
    if DirectoryExists(obra+'\'+ a+'\FARMANET\')=True then
      Begin
        Comprimir( obra+'\'+ a+'\FARMANET\', '*.Txt', obra+'\'+a+'\FARMANET\'+nombre+a+'.zip');
        Chdir(obra+'\'+ a+'\FARMANET\');
        WinExec('cmd /cdel *.txt', SW_SHOW)  ;
      End;
    if DirectoryExists(obra+'\'+ a+'\GLOBALFA\')=True then
      Begin
        Comprimir( obra+'\'+ a+'\GLOBALFA\', '*.Txt', obra+'\'+a+'\GLOBALFA\'+nombre+a+'.zip');
        Chdir(obra+'\'+ a+'\GLOBALFA\');
        WinExec('cmd /cdel *.txt', SW_SHOW)  ;
      End;
    if DirectoryExists(obra+'\'+ a+'\ROFINA\')=True then
      Begin
        Comprimir( obra+'\'+ a+'\ROFINA\', '*.Txt', obra+'\'+a+'\ROFINA\'+nombre+a+'.zip');
        Chdir(obra+'\'+ a+'\ROFINA\');
        WinExec('cmd /cdel *.txt', SW_SHOW)  ;
      End;
  end;
Responder Con Cita