Computer Help Guide

Why Can't I Delete This File in Windows?

Read the exact error before trying again. An open file, missing permission and a synchronized cloud file each call for a different check.

Keep the path and error together

Record the full file location and the exact message. Check whether this is a personal document, a shared folder, or a system location. For files under Windows or an installed program's directory, ask the administrator or use the program's supported removal process.

Message or situation First useful check
A program has the file open Save work and close that program normally
Another user is editing the document Ask them to close it and finish saving
Access is denied Ask the owner or administrator about delete permission
The item belongs to OneDrive or a shared library Check what deletion will remove for other people
Only an app's Recent list contains the item Find its actual location before choosing an action

Close the app using the file

Save any edits and close the document in its editor, viewer or media player. Then retry one deletion. Microsoft explains that an open document can prevent removal, and that removing an item from Office's recent-file list only changes that list. Microsoft's file-deletion guide

If you cannot identify the app, restart Windows after saving your work and try again before reopening it. A file that becomes removable after that restart gives you evidence of a running-process dependency.

Identify a remaining lock

If Microsoft PowerToys is already installed, File Locksmith can show accessible processes using a selected file. Enable the utility in PowerToys, right-click the file and use Show more options > Unlock with File Locksmith. Inspect the named process and close its application normally. Ending a process can discard unsaved work. Results can also omit processes running under another user. Microsoft's File Locksmith documentation

An unfamiliar process name is a reason to ask for identification before terminating it. Keep the screenshot and file path for whoever helps you.

Check cloud and shared-file effects

Deleting from a synchronized OneDrive folder can remove the item from OneDrive and other synchronized devices. Deleting shared content can affect everyone using it. If your goal is to save local disk space while keeping the cloud copy, review OneDrive's Files On-Demand option first. Microsoft's OneDrive deletion explanation

Finish with one identified item

After the cause is resolved, recheck the selected path and filename before deleting. On shared storage, have the owner confirm the intended action. If the error is actually about opening a document, use file-opening checks. Keep the successful change in your notes so a repeated failure can be traced to the same condition.

Sources

Revision history

Published
Updated
— Initial publication.