Copiando Pastas e Subpastas

Delphi

27/03/2005

bom dia pessoal, estou com um problema, me conseguiram aki mesmo no forum um script para copiar pastas e subpastas de um diretorio, bem este esta dando um erro que não consegui corrigir ... Será que alguem poderia me dar uma forcinha???

Desde jah agradeço.............


segue cod....

uses 
SysUtils, 
FileCtrl, 
... 

procedure CopiarArquivos(De, Para: string); 
var 
Search: TSearchRec; 
Done: Boolean; 
begin 
IncludeTrailingBackslash(De); 
IncludeTrailingBackslash(Para); 

Done := FindFirst(De + ´*.*´, faAnyFile, Search) <> 0; 
while not Done do begin 

if (Search.Attr and faDirectory) = faDirectory then begin 

if (Search.Name <> ´.´) and (Search.Name <> ´..´) then begin 
ForceDirectories(Para + Search.Name); 

--> CopiarArquivos(De + Search.Name, Para + Search.Name); 
// erro acontece nesta linha

end; 
end 
else begin 

if not CopyFile(PChar(De + Search.Name), 
PChar(Para + Search.Name), True) then begin 
// trata erro na cópia 
end; 
end; 

Done := FindNext(Search) <> 0; 
end; 
end;


valeu pessoal........


Klaveren

Klaveren

Curtidas 0

Respostas

Sandra

Sandra

27/03/2005

Bloqueado!

Solicitamos dar continuidade na discussão, utilizando este tópico:
http://forum.clubedelphi.net/viewtopic.php?t=59592



Por favor, RELEIA as [url=http://forum.clubedelphi.net/viewtopic.php?t=6689]Regras de Conduta[/url] do fórum.


GOSTEI 0
POSTAR