W
wangjb
Unregistered / Unconfirmed
GUEST, unregistred user!
程序如下:<br>function CopyFiles(const Sour,Dest:string):boolean;<br>var fo:TSHFILEOPSTRUCT;<br>begin<br> FillChar(fo,Sizeof(fo),0);<br> with fo do<br> begin<br> Wnd:=frmInse.Handle;<br> WFunc:=FO_COPY;<br> pFrom:=pchar(sour+#0#0);<br> pTo:=Pchar(Dest+#0#0);<br> fflags:=fof_allowundo or fof_noconfirmmkdir;<br> end;<br> Result:=(SHFileOperation(fo)=0);<br>end;<br>其中 sour='d:/pos/*.*',dest='d:/temp/*.*'<br>保证目录存在,有文件<br>