RenameDatabase()

Summary

Renames a geographic file.

Syntax

RenameDatabase(string old_name, string new_name)

Argument Contents
old_name The full path and file name of the geographic file
new_name The full path and new file name of the geographic file

Notes

  • The old_name can include a full file specification, and must have an extension of either .dbd (standard geographic file) or .cdf (compact geographic file).

  • The extension of new_name must match that of old_name.

  • If you omit the path from new_name, and the current drive and directory are not the location of the geographic file, RenameDatabase() will move the geographic file to the current drive and directory.

Example

RenameDatabase("c:\\data\\states.cdf", " c:\\data\\mystate.cdf")

Error Codes

Error Type Meaning
Error The file extensions of old_file and new_file do not match

See Also

Function Summary
DeleteDatabase() Deletes a standard or compact geographic file
CopyDatabase() Copies either a standard- or compact-format geographic file