拷贝文件时,如果目的文件存在,则要弹出一个文件替换的对话框,请问文件替换的API是什么?
解决方案 »
- TActionMenubar的用法
- 扩展ListView遇到的几个问题,请大家指点一下!
- 想自己注册一个公司,已经交了50个名字了还是通不过,有没有哪位高人帮想想办法,帮顶一下也行。来者有分
- ^-^女友今天過生日^-^差點忘記了~~~^-^~~開始散分^-^生日快樂^-^ 200分(4)
- 如何dbgrideh不响应delete健,
- cdsn有问题了,我的可用分不增了
- 关于insert ,请来看一下
- 关于F1Book的注册问题
- 是DELPHI程序员的有请哟!
- 用FileRead函数分段读出......
- 怎样在TShellListView控件中获得完整的路径??
- 我现在很痛苦,请那位大侠帮帮忙啊,做不出来今晚睡不了呀!!! :((
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for operation if file exists
);
ParameterslpExistingFileNamePoints to a null-terminated string that specifies the name of an existing file. lpNewFileNamePoints to a null-terminated string that specifies the name of the new file. bFailIfExistsSpecifies how this operation is to proceed if a file of the same name as that specified by lpNewFileName already exists. If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds. Return ValuesIf the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
if MessageDlg('文件'+sFileName+'已经存在是否替换?', mtConfirmation, [mbYes, mbNo], 0)=mrYes
then
begin
CopyFile(...);
.....
end;