Vou tentar sim, muito obrigado Eduardo.

Cordialmente, Filipe.


  ----- Original Message -----
  From: Eduardo Alves
  To: delphi-br@yahoogrupos.com.br
  Sent: Thursday, May 25, 2006 5:54 PM
  Subject: RE: [delphi-br] Problema com cópia de Arquivo.


  Tente assim e ve se funciona !!!

  //uses FileCtrl;
  var
     Arquivo,
     vms_Caminho,
     vms_Destino : String;
     vmp_Arquivo,
     vmp_Destino : Array [0..511] of Char;

  begin
      try
         Arquivo     := 'teste.txt';
         vms_Caminho := 'C:\' + Arquivo;
         vms_Destino := 'C:\testeBB\';

         if FileExists(vms_Caminho) then
         begin
            if not DirectoryExists(vms_Destino) then
               if not ForceDirectories(vms_Destino) then
               begin
                  ShowMessage('Não foi possivel criar pasta de destino.');
                  Exit;
               end;
            vms_Destino := 'C:\testeBB\' + Arquivo;
            if FileExists(vms_Destino) then
               DeleteFile(vms_Destino);
            StrPCopy(vmp_Arquivo, vms_Caminho);
            StrPCopy(vmp_Destino, vms_Destino);
            CopyFile(vmp_Arquivo , vmp_Destino, False);
         end;
      except
         ShowMessage('Ocorreu um erro ao copiar o arquivo');
      end;
  end;



  Eduardo Castro Alves
  Analista de Sistemas


[As partes desta mensagem que não continham texto foram removidas]






--
<<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>>

<*> Para ver as mensagens antigas, acesse:
    http://br.groups.yahoo.com/group/delphi-br/messages

<*> Para falar com o moderador, envie um e-mail para:
    [EMAIL PROTECTED]



Yahoo! Grupos, um serviço oferecido por:
PUBLICIDADE


Links do Yahoo! Grupos

Responder a