try
ShFileOperation(F);
except
ShowMessage('文件拷贝失败!');
end;
ShFileOperation(F);
except
ShowMessage('文件拷贝失败!');
end;
解决方案 »
- 为什么加载ActiveX 时 ,出现 Undelcared identifier ×××××
- 这样的dll问题如何解决
- 我的object pascal很烂,请哥哥弟弟们帮我构建几个函数,我这里有很多vcl的组件,大家可以交流一下,急在线等
- 请教使用undown控件时,如何鉴别按下的是那个方向的按钮呢
- 如何在combobox中显示图片
- 大清早送分200,并问高手一个问题?
- 新手,关于MYSQL数据库连接问题
- 為什么運行時會有這樣的錯誤呢?
- 被封用户,半月有余,今天始得解封,散分以示庆贺!
- image字段如何人保存?
- 那里有局域网用的QQ程序。
- 编译错误:File not found:'DBGRIDEH.RES',该如何解决?
或CopyFileTo
或CopyFileTo
Except
异常执行代码
end;try
finally
必执行代码
end;
文件存在
else
文件不存在!
F.fFlags:=FOF_ALLOWUNDO OR FOF_RENAMEONCOLLISION;
改成
F.fFlags:=FOF_ALLOWUNDO OR FOF_RENAMEONCOLLISION OR FOF_NOERRORUI;
FOF_ALLOWUNDO Preserve Undo information, if possible. If pFrom does not contain fully qualified path and file names, this flag is ignored.
FOF_FILESONLY Perform the operation on files only if a wildcard file name (*.*) is specified.
FOF_MULTIDESTFILES The pTo member specifies multiple destination files (one for each source file) rather than one directory where all source files are to be deposited.
FOF_NOCONFIRMATION Respond with "Yes to All" for any dialog box that is displayed.
FOF_NOCONFIRMMKDIR Do not confirm the creation of a new directory if the operation requires one to be created.
FOF_NO_CONNECTED_ELEMENTS Version 5.0. Do not move connected files as a group. Only move the specified files.
FOF_NOCOPYSECURITYATTRIBS Version 4.71. Do not copy the security attributes of the file.
FOF_NOERRORUI Do not display a user interface if an error occurs.
FOF_NORECURSION Only operate in the local directory. Don't operate recursively into subdirectories.
FOF_RENAMEONCOLLISION Give the file being operated on a new name in a move, copy, or rename operation if a file with the target name already exists.
FOF_SILENT Do not display a progress dialog box.
FOF_SIMPLEPROGRESS Display a progress dialog box but do not show the file names.
FOF_WANTMAPPINGHANDLE If FOF_RENAMEONCOLLISION is specified and any files were renamed, assign a name mapping object containing their old and new names to the hNameMappings member.
FOF_WANTNUKEWARNING Version 5.0. Send a warning if a file is being destroyed during a delete operation rather than recycled. This flag partially overrides FOF_NOCONFIRMATION