Files.Rename |
Top Previous Next |
Syntax function Files.Rename(OldName: string; NewName: string): boolean
Alternative Names
Description Renames a file identified by OldName into the name NewName. If no path information is included, the current working directory is assumed.
Returns FALSE on failure, you can use Shell.GetLastError for more information.
See also
Example execute udsblock as begin Files.Rename('c:\temp\testfile.txt', 'c:\temp\testfile2.txt');
if Files.FileExists('c:\temp\testfile2.txt') then GUI.ShowMessage('Rename successful.'); else GUI.ShowMessage('Rename failed.'); end |