如何才能用程序更改文件名称呀
如何才能用程序更改文件名称呀 问题点数:40、回复次数:6Top
1 楼facedge(朝戈)回复于 2003-11-01 20:53:13 得分 30
RenameFile()Top
2 楼maozefa(阿发伯)回复于 2003-11-01 21:09:46 得分 0
一楼得分Top
3 楼angelface(§<@#$&^%$>§)回复于 2003-11-01 21:21:33 得分 0
ok 一楼Top
4 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-11-01 21:32:56 得分 0
RenameFile()Top
5 楼ballflying(菠菜)回复于 2003-11-02 00:21:09 得分 0
yes! renamefile(oldname,newname)!Top
6 楼saien(精益求精)回复于 2003-11-02 00:30:16 得分 10
下面代码是对目录操作,对你应该有启发。
procedure makedir(modulname,pathname,dirname,filepath:string);
begin
try
if not directoryexists(frootpath+modulname) then
createdir(FRootPath+modulname);
if not DirectoryExists(FRootPath+modulname+'\'+pathname) then
createdir(FRootPath+modulname+'\'+pathname);
if not directoryexists(FRootPath+modulname+'\'+pathname+'\'+dirname) then
createdir(FRootPath+modulname+'\'+pathname+'\'+dirname);
if filepath<>'' then
if not directoryexists(FRootPath+modulname+'\'+pathname+'\'+dirname+'\'+filepath) then
createdir(FRootPath+modulname+'\'+pathname+'\'+dirname+'\'+filepath)
except
On E:Exception do begin
abort;
end;
end;
删:RemoveDir
Top




