File geodatabases and Microsoft File Explorer

Manage file geodatabases—including copying, renaming, and deleting data—using ArcGIS, not Microsoft File Explorer. The tools in ArcGIS ensure that no data loss or other problems occur.

Because a file geodatabase appears as a folder of files in File Explorer, people may attempt to use the commands available in File Explorer with file geodatabases. Other than setting permissions on the folder to control access, it is recommended that you don't use these File Explorer commands.

The information below provides background as to why you shouldn't rename, delete, or copy file geodatabases and their contents or remove lock files using File Explorer.

File geodatabase files in File Explorer

A file geodatabase is stored as a folder of files. When you view the folder with File Explorer, apart from the .gdb extension, it looks like any other folder, and you can view its contents. The folder contains cryptically named files that hold geographic data, attribute data, index files, lock files, and a signature file, as well as other files. Each feature class or table in the geodatabase is stored in two or more files. It is difficult, if not impossible, to tell which files make up any given dataset.

List of files in File Explorer

Set permissions

File geodatabases do not have authentication or authorization capabilities. You cannot control access to individual datasets by modifying the permissions of individual files in a file geodatabase folder.

However, you can share a file geodatabase folder as read-only with File Explorer. In this case, the read-only user can display and query but not edit the data. Do not allow more than one user to have write access to the folder. When those reading the data refresh their map display, any changes saved by the user who has write access are updated in the ArcGIS client session of the reading users. Refresh never brings in unsaved edits, so a user cannot read changes made by another user that have not been saved. To prevent other users from accessing data while you are editing it, unshare the folder before modifying the data.

Rename and delete

In file geodatabases, you cannot use File Explorer to perform an operation on an individual dataset. Renaming and deleting individual files in a file geodatabase folder and copying files to another location cause data loss and can render the geodatabase unusable. For example, if you use File Explorer to move files to another geodatabase folder, you won't be able to access the data. The contents of a file geodatabase folder are given cryptic names by design to discourage such operations. Operations on individual datasets can only be performed through ArcGIS.

Perform operations at the geodatabase level solely through ArcGIS. You can, however, rename or delete the file geodatabase folder except in the following cases:

  • You cannot rename or delete the geodatabase folder at the same time another user is accessing the data from any client.
  • Do not rename or delete a file geodatabase folder if the file geodatabase is saved in any ArcGIS AllSource project.
Note:

Just like when you work with other types of files, it is a good idea to regularly make a backup copy of your file geodatabase in case something goes wrong.

Copy

Although not recommended, it is possible to copy a file geodatabase to another location by copying the folder to another location. Only copy a file geodatabase with File Explorer when you are certain there are no other processes accessing the data. The problem is that it can be difficult to tell whether other processes are accessing the data. You might think there are no other processes; however, a process on your computer or another one could be accessing it. If you copy the folder when another process is accessing the data, the data may not copy properly. An improper copy operation is often not apparent—you may not notice any problems until you access a certain part of the new copy later.

Due to this uncertainty and the potential to corrupt the file geodatabase, do not use File Explorer to copy a file geodatabase.

Remove lock files

ArcGIS ensures data integrity by preventing multiple processes from simultaneously accessing data in conflicting ways. ArcGIS keeps track of processes by placing *.lock files in the file geodatabase folder each time a process accesses a dataset. When the process ends, its *.lock files are automatically deleted.

When a process ends prematurely or crashes, lock files may be temporarily left in the geodatabase folder. ArcGIS eventually removes these files in future sessions as new locks are taken. In the meantime, such files do not continue to lock data, and as they take up no disk space, removing them provides no benefit.

The Compact tool removes all inactive lock files as part of the compacting process. Copying and pasting a file geodatabase also removes all inactive lock files from the source geodatabase before copying data to the new geodatabase.