怎样拷贝目录
How to Copy A Directory?
In Win32 there is an API function for that: SHFileOperation.
copy a whole directory tree
procedure TForm1.Button2Click(Sender: TObject);
var
; OpStruc: TSHFileOpStruct;
; frombuf, tobuf: Array [0..128] of Char;
Begin
; FillChar( frombuf, Sizeof(frombuf), 0 );
; FillChar( tobuf, Sizeof(tobuf), 0 );
; StrPCopy( frombuf, 'd:/brief/*.*' );
; StrPCopy( tobuf, 'd:/temp/brief' );
; With OpStruc DO Begin
; ; Wnd:= Handle;
; ; wFunc:= FO_COPY;
; ; pFrom:= @frombuf;
; ; pTo:=@tobuf;
; ; fFlags:= FOF_NOCONFIRMATION or FOF_RENAMEONCOLLISION;
; ; fAnyOperationsAborted:= False;
; ; hNameMappings:= Nil;
; ; lpszProgressTitle:= Nil;
; end;
; ShFileOperation( OpStruc );
end;
;