使用copyfile函数,出现“无法复制文件:无法读源文件或磁盘” 怎么办~~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 要么找帮助文件,要么贴出源代码,或是用API 就是用API啊 var sfo: TSHFileOpStruct;begin try if Source = nil then raise Exception.Create('NULL'); if DestinationFolder = nil then raise Exception.Create('NULL'); ZeroMemory(@sfo, SizeOf(TSHFileOpStruct)); sfo.Wnd:= 0; sfo.wFunc:= fo_Copy; sfo.pFrom:= PChar(Source + #0); sfo.pTo:= PChar(DestinationFolder + #0); sfo.fFlags:= fof_NoConfirmation + fof_NoConfirmMkDir + fof_Silent; Result:= SHFileOperation(sfo) = 0; except Result:= False; end; 咱不能用呢:我把的代码贴出来楼主看一下吧:ExePath := ExtractFilePath(Application.Exename)+'数据库模板\Tarmoto.mdb'; TarExePath := SDG.FileName+lb_TarId.Items.Strings[0]+'='+TemQry3.FieldByName('pact_czdw').AsString+'-'+FormatDateTime('yy-mm-dd-hh-mm-ss',now()); CopyFile(Pchar(ExePath),Pchar(TarExePath+'.mdb'),false); 请教一个打印问题 请问有谁做过mrf-35读写器读写m1呢,能不能给给例子啊。万分感谢!! Blog里面内容被还原到前一天了,郁闷.....CSDN的客服,帮助哪里找??? 怎样把缓冲区中的指定字节数的数据考到另外一个缓冲区中 bof或eof中有一个是真,或者当前的记录已被删除,所需的操作要求一个当前的纪录?怎么回事? 很简单的问题,帮帮小妹 如何制作需要身份验证的邮件收发程序,只要解决立即给分! 函数声明 简单问题-----给分了----- 为什么在修改imagelist的大小时,图标都必须重新加入?为什么? 窗体的调用 一个简单但很急的问题,在线等,解答立即给分
sfo: TSHFileOpStruct;
begin
try
if Source = nil then raise Exception.Create('NULL');
if DestinationFolder = nil then raise Exception.Create('NULL');
ZeroMemory(@sfo, SizeOf(TSHFileOpStruct));
sfo.Wnd:= 0;
sfo.wFunc:= fo_Copy;
sfo.pFrom:= PChar(Source + #0);
sfo.pTo:= PChar(DestinationFolder + #0);
sfo.fFlags:= fof_NoConfirmation + fof_NoConfirmMkDir + fof_Silent;
Result:= SHFileOperation(sfo) = 0;
except
Result:= False;
end;
TarExePath := SDG.FileName+lb_TarId.Items.Strings[0]+'='+TemQry3.FieldByName('pact_czdw').AsString+'-'+FormatDateTime('yy-mm-dd-hh-mm-ss',now()); CopyFile(Pchar(ExePath),Pchar(TarExePath+'.mdb'),false);