CMD-FILE-IN-USE
What it means
Another program currently has the file open or locked, preventing the command from modifying or deleting it.
Also seen as: being used by another process
Quick fix steps
- Close any program that might have the file open, including background apps you might not immediately think of.
- Use tasklist to check for a process that might be holding the file, and taskkill to close it if you can identify it confidently.
- If the file is still locked with nothing obvious holding it, a restart will release almost any lock that a normal close won't.
For the full step-by-step walkthrough, see Using tasklist and taskkill to Find and Close Frozen Programs.
Frequently Asked Questions
How do I know which program has the file open?
Resource Monitor (search "resmon") has a CPU tab with a "Associated Handles" search that can show you exactly which process has a specific file locked, which is more precise than guessing.
Is it safe to force-close the program holding the file?
Generally yes, though you'll lose any unsaved changes in that specific program — saving your work there first, if possible, is the safer approach before force-closing it.
Other error codes
CMD-NOT-RECOGNIZED — "is not recognized as an internal or external command"
Command Prompt can't find the program or command you typed, usually because of a typo, a missing space, or the program not being in a location Windows searches by default (its PATH).
CMD-ACCESS-DENIED — "Access is denied" in Command Prompt
The command you ran needs administrator privileges that the current Command Prompt window doesn't have.
DISM-SOURCE-FILES-NOT-FOUND — DISM Error: The Source Files Could Not Be Found
DISM couldn't reach Windows Update to download the repair files it needs, or a local source wasn't specified.
CMD-PATH-NOT-FOUND — "The System Cannot Find the Path Specified"
The folder path in your command doesn't exist, or was typed incorrectly.