Fix ‘The Action Cannot Be Completed’ File-in-Use Error in Windows
Source-checked · About 5 minutes
Answer
Read the app name in the File in use message. Save and close that app, then retry the exact rename, move, or delete action. If Windows does not name the owner or the message returns, scan that exact item with Microsoft PowerToys File Locksmith. End only a recognized app after saving; never force-close Windows, security, encryption, or sync software.
Leave the message open long enough to read the file name and any app Windows identifies, then select Cancel. If it names the app, continue to Step 2; if the owner is missing or vague, go to Step 3 instead of closing unrelated programs.
2
Save and close the named app
Return to the named app, save the document or project, wait for any export or sync indicator to finish, and close the file with the app's normal Close or Exit command. Retry the original rename, move, or delete action; if it succeeds, stop.
3
Enable File Locksmith when the owner is unclear
If PowerToys is not installed, get it from Microsoft Store or Microsoft's linked installation page. Open PowerToys Settings, select File Locksmith, and turn on Enable File Locksmith; do not download a similarly named unlocker from an advertisement or software mirror.
4
Scan the exact file or folder
In File Explorer, select the blocked file or folder, right-click it, choose Show more options, then select Unlock with File Locksmith. Wait for the scan to list the processes using that item; scanning a folder also checks its files and subfolders.
5
Close only the identified owner
Expand the result to confirm the process and file path. Save its work and close the app normally first. Use End task only if that recognized app will not close and you accept losing its unsaved work; if expected results are missing because another user or an elevated process owns them, select Restart as administrator and scan again.
6
Retry the same file operation
Repeat the exact rename, move, or delete action that failed. Success means the File in use message does not return and the intended file appears at its new name or location, or in Recycle Bin; keep it recoverable until you verify that the correct item changed.
If it does not work
If File Locksmith lists Windows, security, encryption, backup, or sync software, do not repeatedly choose End task. Finish or pause that product's current operation through its own interface, or ask the device administrator what owns the file.
If the same process returns immediately, the app or service is actively reopening the file. Stop changing Windows, record the process name and full file path, and use that product's support instructions instead of deleting temporary files or ending broad process groups.
If File Locksmith finds no process even after Restart as administrator, save all work and restart Windows once, then retry the original action before reopening other apps. A file on a managed or shared location may be held elsewhere; ask the administrator rather than force-delete it.
ⓘ Sources and verification
Checked against official documentation on . Scope: Windows 10, Windows 11.
Source-checked against current Microsoft PowerToys documentation. No hands-on Windows retest was performed. This page is intentionally image-free because the reader's own process result identifies the owner; another user's file name or process would not prove the correct choice.