Symptoms
- Error message mentions the file is open or in use elsewhere
- The program you think is using it appears to be closed
- Retrying the delete a few times doesn't help
- May involve a file that was recently used or is in a shared/synced folder
Likely causes
- CommonA background process still has the file openSome programs keep files open in the background even after their main window is closed.
- CommonFile is being synced by cloud storage software (OneDrive, Dropbox, Google Drive)Sync clients often lock files briefly while uploading or checking for changes.
- PossibleA crashed program left the file handle open without fully closingWhen software crashes, it doesn't always release files properly.
- PossibleWindows Explorer itself has a lingering preview or thumbnail lock on the fileExplorer's preview pane or thumbnail generation can hold a lock briefly.
- Less commonAntivirus software scanning the file at that momentA security scan in progress can temporarily lock a file from other operations.
What to do
- Close any programs that might reasonably have the file open, including background apps you might have forgotten about, and try deleting again.
- Check the system tray (bottom-right icons) for cloud sync software like OneDrive or Dropbox, and pause syncing temporarily before trying again.
- Restart File Explorer via Task Manager (find Windows Explorer, right-click, Restart) in case Explorer itself is holding a stale lock.
- Use Task Manager's 'Details' tab to look for the specific program's process still running in the background and end it if it's safe to do so.
- Try deleting or moving the file from a Command Prompt using 'del' instead of File Explorer, which sometimes succeeds when the graphical method doesn't.
- If none of this works, restart the computer, which releases essentially all file locks, then try deleting the file immediately after restart before other programs load.
- For a file that's persistently locked by cloud sync software, check that software's own status to confirm the upload or sync has genuinely finished before retrying.
When to call a pro
If a file remains undeletable even after a restart, a technician can use specialized tools to identify exactly what's holding the lock.
Safety
Generally low risk
Generally low risk for a careful person. Stop if anything looks different from what this guide describes.