谢谢!copyfile(’源文件’,’目标文件’,是否覆盖已存在文件);源文件如果在程序根目录,可不可以不打目录名?还有,如果选择目标目录?
解决方案 »
- adotable里面可以使用sql语句吗?
- 我的DELPHI7安装不正确吗?(关于CORBA)
- 如何在增删改时不直接操作数据库???
- 求DsgnIntf.dcu
- 关于delphi的相对路径问题(在线等。。。。。。。。。。。好着急)
- 关于MSDE 的两个问题 1、安装我的系统时如何自动安装MSDE???2、如何自动设置启动操作系统时启动MSSQLSERVER服务???
- 在线等待,马上结帐
- 如何让我编的程序能够打开所有这样类型的文件?
- 如何生成一个文件在某个目录下?
- 谁能给我寄一份Delphi3中自带的图片资源?
- 急!小弟今接到经理一任务,要求小弟用Delphi做一个能将图片与音乐合成Mpeg软件,小弟没了头绪,求各位大侠帮帮忙,哪怕是一个函数!
- 做过监控系统就进来看看!!!
out Directory: string): Boolean;
begin
if not FileExists(Edit1.Text) then
begin
ShowMessage('Source File ('+ Edit1.Text +') not is found!');
exit;
end;
if (Edit1.Text='') or (Edit2.Text='') then
begin
ShowMessage('FileName not is null!');
exit;
end; CopyFile(PChar(Edit1.Text),PChar(Edit2.Text),True);
if not FileExists(Edit2.Text) then
begin
ShowMessage('Copy File is Error!Retry or ByeBye!');
exit;
form2.Close;
end;
ShowMessage('From '+Edit1.Text +'\n'+'To '+Edit2.Text+'\n'+'Finish!' );
end;
//我曾經寫的一個例子,共同學習
begin
if not FileExists(Edit1.Text) then
begin
ShowMessage('Source File ('+ Edit1.Text +') not is found!');
exit;
end;
if (Edit1.Text='') or (Edit2.Text='') then
begin
ShowMessage('FileName not is null!');
exit;
end; CopyFile(PChar(Edit1.Text),PChar(Edit2.Text),True);
if not FileExists(Edit2.Text) then
begin
ShowMessage('Copy File is Error!Retry or ByeBye!');
exit;
//有點不對,不要form2.Close;這是我另有他用......
end;
ShowMessage('From '+Edit1.Text +'\n'+'To '+Edit2.Text+'\n'+'Finish!' );
end;