把D:/aaa目录拷贝到D:/bbb下:
.
.
.
uses ... ,shellapi;
.
.
.
procedure TForm1.Button1Click(Sender: TObject);
var FData : TShFileOpStruct;
begin
Fdata.pFrom := 'd:/aaa';
fdata.pTo := 'd:/bbb';
fdata.wFunc := FO_COPY
FData.Wnd := Application.Handle
fData.lpszProgressTitle := 'Wait';
fData.fFlags := FOF_ALLOWUNDO OR FOF_NOCONFIRMMKDIR
OR FOF_NOCONFIRMATION
OR FOF_SILENT
ShFileOperation( FData );
end;