![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#2
|
||||
|
||||
El truco 325 de trucomania te dice como copiar un directorio y sus subdirectorios y ficheros. Te lo reproduzco:
Código:
-Incluye ShellApi en el uses de tu form procedure TForm1.Button1Click(Sender: TObject); function CopiaTodo(Origen,Destino : String) : LongInt; var F : TShFileOpStruct; sOrigen, sDestino : String; begin Result := 0; sOrigen := Origen + #0; sDestino := Destino + #0; with F do begin Wnd := Application.Handle; wFunc := FO_COPY; pFrom := @sOrigen[1]; pTo := @sDestino[1]; fFlags := FOF_ALLOWUNDO or FOF_NOCONFIRMATION end; Result := ShFileOperation(F); end; begin CopiaTodo('c:\Delphi3\*.*','c:\kk'); end;
__________________
Saludos, Peter Investment |
|
|
![]() |
|