Maptitude GISDK Help

RenameFile()

Summary

Copies, moves, or changes the name of a file.

 

Syntax

RenameFile(string source_file, string dest_file)

 

Argument Contents
source_file The source file name
dest_file The destination file name

 

Notes

Examples

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 Codes

Error Type Meaning
Error dest_file already exists.
NotFound source_file does not exist

 

See Also

Function Summary
CopyFile() Copies a file
DeleteFile() Deletes a file

 

 

©2025 Caliper Corporation www.caliper.com