如果在备份单机版数据库时(copyfile函数),由于目标文件事先并不存在,这样先用if not fileexits then 判断,但是假如判断后,没有目标

chris2019 2002-04-16 09:37:18
tell me
...全文
85 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
chris2019 2002-04-21
  • 打赏
  • 举报
回复
pppppppp
outer2000 2002-04-16
  • 打赏
  • 举报
回复
函数本身就可创建一个不存在的文件啊?
outer2000 2002-04-16
  • 打赏
  • 举报
回复
BOOL CopyFile(

LPCTSTR lpExistingFileName, // pointer to name of an existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for operation if file exists
);


Parameters

lpExistingFileName

Points to a null-terminated string that specifies the name of an existing file.

lpNewFileName

Points to a null-terminated string that specifies the name of the new file.

bFailIfExists

Specifies 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.
outer2000 2002-04-16
  • 打赏
  • 举报
回复
BOOL CopyFile(

LPCTSTR lpExistingFileName, // pointer to name of an existing file
LPCTSTR lpNewFileName, // pointer to filename to copy to
BOOL bFailIfExists // flag for operation if file exists
);


Parameters

lpExistingFileName

Points to a null-terminated string that specifies the name of an existing file.

lpNewFileName

Points to a null-terminated string that specifies the name of the new file.

bFailIfExists

Specifies 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.
zx_wang 2002-04-16
  • 打赏
  • 举报
回复
copyfile

2,496

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧