Description
Attempting to rename a file geodatabase returns the following error:
Error:
Failed to rename object.
Cause
There are two possible causes:
- There is a .lock file for the geodatabase. The .lock files are created when a process accesses the dataset.
- Anti-virus software prevents renaming the geodatabase.
Note:
In some cases, .lock files may be left in the geodatabase folder afterwards (for example, when a process ends prematurely.)
Solution or Workaround
Use one of the following solutions to resolve this issue.
- Restart ArcMap to terminate the process. If the .lock files remain after the process is finished, remove the .lock files manually. For more information, refer to FAQ: Why do file geodatabase .lock files remain after a process is finished?
- Add exceptions for all ArcGIS applications to the anti-virus software.
- Temporarily relocate the .gdb file and the backup .gdb file.
- Navigate to the .gdb folder location.
- Move the .gdb folder to another location.
- Start ArcCatalog.
- Copy and paste the previously relocated .gdb folder to the main folder location, and rename the file.
Note:
A backup file geodatabase can be created by building a new file geodatabase and loading the desired data into the backup, or by copying the .gdb folder into another drive.