把目录c:/aaa复制为c:/bbb
USES ShellApi
var:
lpFileop:TSHFileopstruct;
begin
with lpfileop do
begin
wnd:=self.Handle;
wfunc:=Fo_move;
pfrom:=pchar('c:/aaa');
pto:=pchar('c:/bbb');
fflags:=fof_allowundo;
hnamemappings;=nil;
lpszprogresstitle:=nil;
fanyoperationsaborted:=true;
end;
if shfileoperation(lpfileop)<>0 then
showmessage('删除失败');
end;