文件拷贝 :
①定义API:
Function ulong CopyFile(ref string lpExistingFileName,ref string lpNewFileName,ulong bFailIfExists) LIBRARY "kernel32.dll" ALIAS FOR "CopyFileA"
②脚本:
string str_source, str_des
ulong ulng_result
str_source = "c:\lag.txt" //源文件
str_des = "c:\tmp\111.txt" //目标文件
ulng_result=CopyFile(str_source,str_des, 0)
if ulng_result<>0 then
messagebox("OK","拷贝文件成功!")
end if