function RenameFile(const OldName, NewName: string
): Boolean;

解决方案 »

  1.   

    procedure Rename(const ASourceFile: string; const ADestFile: string);Parametersconst ASourceFile: stringOriginal file name.
    const ADestFile: stringNew file name.
      

  2.   

    renamefile (原文件名,新文件夹名)比如:if renamefile('C:\old.txt','C:\new.txt') then showmessage('重命名成功。') else showmessage('失败');