# Unlocking Files

To control access to various parts of filePro, filePro maintains a locking system to prevent simultaneous access to various parts of the system when such access can cause problems. For instance, only one user can expand a file and only if nobody else is using the file at that point in time. The locking system will create a flag in the appropriate file to prevent file integrity problems. These files exist on multi-user and network systems in each filePro directory and qualifier as LOCKFILE, LOCKFQ1, LOCKFQ2, etc. (where Q1 and Q2 are qualifiers) and are maintained and accessed by all the applicable programs.

Although filePro manages the locking and unlocking processes routinely, unexpected events like power interruptions, hard disk failures, or inadvertent machine resets can leave a corrupted lock file if files were open when the interruption occurred. If this happens, you will have to unlock the files using filePro's unlock feature. Use the directory option to delete lock files by selecting the file and then pressing "D" to delete. Select "M" to delete the lock file for each file open during the unexpected event. You can also use a menu Flag "-L" to delete a lock file with the ddir or dprodir program. Refer to flag options. Keep in mind that lock files are created for each set of data so you may have to set the qualifier name when using the directory option. When using the menu flags, the "-M" flag must be used in conjunction with the "-L" flag to unlock qualified data files.