Troubleshooting Guide: Error 220 – “File Checked Out or Locked for Editing”
Why This Error Happens
This error occurs when a file’s metadata retains a “lock” flag from a previous session that wasn’t properly released, often due to an application crash, an abrupt network disconnection, or a forced shutdown while the file was open. Windows 11 and file-syncing services (like OneDrive, SharePoint, or network shares) use lock files (e.g., ~$filename) to prevent simultaneous edits, but if the process that created the lock terminates unexpectedly, the lock isn’t cleared. Insufficient NTFS permissions or stale SMB session handles on a network share can also cause the system to falsely report the file as in-use.
Step-by-Step Resolution Guide
- Check for hidden lock files: Navigate to the folder containing the file in File Explorer, enable hidden items (View > Show > Hidden items), and delete any temporary lock file starting with
~$that matches your document’s name. - Close background sessions: Open Task Manager (Ctrl+Shift+Esc), go to the Details tab, and end any lingering processes for the application (e.g.,
WINWORD.EXE,EXCEL.EXE) that may still hold the file open in the background. - Clear SMB/network cache: If the file is on a network share, open Command Prompt as Administrator and run:
net use * /delete
Then reconnect to the share and try opening the file again.
- Verify NTFS/Share permissions: Right-click the file > Properties > Security tab, and confirm your user account has Modify and Write permissions. Adjust via Edit if needed.
- Restart the sync/file service: If using OneDrive or SharePoint, right-click the OneDrive icon in the system tray, select Pause syncing, wait 30 seconds, then Resume syncing to force a lock-status refresh.
Alternative or Verification Steps
- Verify the fix: Try opening the file directly from its source location (not a cached or offline copy) and confirm no “read-only” or “locked” banner appears at the top of the application.
- Alternative solution: If the lock persists, make a copy of the file, rename it, and open the renamed copy—this confirms whether the issue is with the file itself or the original lock reference, and allows you to recover your work while IT resolves the underlying lock on the server.