tumblr tracker

Rename

Library Reference ›› File ››
Parent Previous Next

File.Rename


Namespace: File


Renames the file name without moving it to another folder.


retval = File.Rename(SourceFilePath, NewFileName)


Parameters:

- SourceFilePath; string constant or variable containing the file path of the source file

- NewFileName; string constant or variable containing the new file name


Returns:

True if successful, otherwise false; boolean value.


Example


File.Rename("C:\TEMP\somefile.txt", "somefile2.txt")