windows 2000,成批拷贝文件,报'无法复制pos010,文件名、目录名或卷标语法不正确(50分)

W

wangjb

Unregistered / Unconfirmed
GUEST, unregistred user!
程序如下:<br>function CopyFiles(const Sour,Dest:string):boolean;<br>var fo:TSHFILEOPSTRUCT;<br>begin<br>&nbsp; FillChar(fo,Sizeof(fo),0);<br>&nbsp; with fo do<br>&nbsp; begin<br>&nbsp; &nbsp; Wnd:=frmInse.Handle;<br>&nbsp; &nbsp; WFunc:=FO_COPY;<br>&nbsp; &nbsp; pFrom:=pchar(sour+#0#0);<br>&nbsp; &nbsp; pTo:=Pchar(Dest+#0#0);<br>&nbsp; &nbsp; fflags:=fof_allowundo or fof_noconfirmmkdir;<br>&nbsp; end;<br>&nbsp; Result:=(SHFileOperation(fo)=0);<br>end;<br>其中 sour='d:/pos/*.*',dest='d:/temp/*.*'<br>保证目录存在,有文件<br>
 
dest='d:/temp/'<br>试一试,<br><br>dos的使用经验
 
请大家支持
 
接受答案了.
 
顶部