Maptitude GISDK Help |
Copies, moves, or changes the name of a file.
RenameFile(string source_file, string dest_file)
Argument |
Contents |
source_file |
The source file name |
dest_file |
The destination file name |
If dest_file has no drive and folder then it is renamed in the same drive and folder as source_file; if dest_file has no drive or the same drive but a different folder then it is moved to that folder; otherwise source_file is copied to the drive and folder specified by dest_file.
dest_file must not already exist.
RenameFile("c:\\Temp\\x.txt", "y.txt") // The new file name is c:\Temp\y.txt
RenameFile("c:\\Temp\\x.txt", "\\Stuff\\x.txt ") // The file is moved to the Stuff folder
RenameFile("c:\\Temp\\x.txt", "a:\\x.txt ") // The file is copied to the a: drive
Error Type |
Meaning |
Error |
dest_file already exists. |
NotFound |
source_file does not exist |
Function |
Summary |
Copies a file |
|
Deletes a file |
©2025 Caliper Corporation | www.caliper.com |