RenameFile()
语法
Result = RenameFile(OldFilename$, NewFilename$)概要
Rename the old file to the new file.
参数
OldFilename$ The old name of the file. NewFilename$ The new name of the file.
返回值
Returns nonzero if the operation succeeded and zero if it failed.
Remarks
The old and new filename do not have to be in the same directory, so this function can be used to move a file to a different directory. This function can also be used to rename/move directories.
示例
If RenameFile("C:\test.txt", "D:\temp\test_backup.txt") Debug "Moving and renaming successful." ; Moving and renaming of the file was successful Else Debug "Moving and renaming failed." ; Moving and renaming failed, e.g. because of a not found source file EndIf
参阅
CopyFile(), DeleteFile(), CreateFile(), CopyDirectory()
已支持操作系统
所有