Fix "The requested resource is in use" Error
In this article
The "The requested resource is in use" error appears when Windows cannot modify, delete, or replace a file or folder because another program is currently using it. The fix is to identify and close the program holding the resource, or use a built-in tool like Disk Cleanup or a restart to release it.
What Causes This Error?
Windows locks files and folders that are open by applications, system processes, or background services. When you try to rename, move, delete, or overwrite such a resource, the system blocks the action and shows this message. Common culprits include:
- Open documents in Word, Excel, or other editors
- Media files playing in a music or video player
- Files being synced by cloud services like OneDrive or Dropbox
- Antivirus or backup software scanning the file
- System processes like Windows Search indexing the folder
- Apps running in the system tray that you forgot about
Quick Fixes to Try First
Start with these simple steps before moving to more advanced methods. They resolve most cases without needing extra tools.
- Close all open applications, especially those that might use the file (e.g., if it's a document, close Word).
- Check the system tray (bottom-right corner) for hidden apps and right-click to exit them.
- If the file is on a network drive, disconnect and reconnect the drive.
- Restart your computer. This releases all locks and is the most reliable fix.
If the error persists after a restart, the problem is likely a background process that starts automatically. Continue with the methods below.
Use Task Manager to Find the Locking Process
Task Manager shows running processes, but it doesn't directly tell you which one locks a specific file. However, you can often guess by the file type. For example, if the file is a PDF, look for a PDF reader in the list. If it's an image, check photo viewers.
To open Task Manager, press Ctrl + Shift + Esc. Go to the Processes tab, look for apps that match the file type, right-click them, and choose End task. Then try your file operation again. If you're unsure, close all user apps one by one, testing after each.
For a more precise approach, you can use the built-in Resource Monitor (type resmon in the Start menu). Under the CPU tab, expand Associated Handles, type the file name in the search box, and it will list processes using that file. Right-click the process and choose End Process (be careful not to end critical system processes).
Use Command Prompt to Force Delete or Rename
If you need to delete or rename the file and you know no application is using it, you can use Command Prompt to bypass some locks. However, this won't work if a process truly holds the file open—it will just show a different error.
- Open Command Prompt as administrator (right-click Start and select Terminal (Admin) or Command Prompt (Admin)).
- Type
del "C:\full\path\to\file.ext"to delete, orren "C:\old\name.ext" "newname.ext"to rename. - Press Enter. If it succeeds, great. If it fails, the file is still locked.
This method works for files locked by Explorer itself, but not for files locked by other services. It's a quick test, not a guaranteed fix.
Restart Windows Explorer
Sometimes the Windows Explorer process (which manages the desktop, taskbar, and file windows) holds a lock on a folder you're browsing. Restarting Explorer releases those locks without a full reboot.
- Open Task Manager (Ctrl + Shift + Esc).
- Under Processes, find Windows Explorer.
- Right-click it and select Restart. The taskbar will disappear and reappear.
After that, try your file operation again. This is especially useful when the error occurs on a folder you have open in File Explorer.
Use Disk Cleanup or Storage Sense
If the error occurs when trying to delete temporary files or system files, use the built-in cleanup tools instead of manual deletion. They handle locked files properly.
Open Disk Cleanup by typing it in the Start menu. Select the drive, click Clean up system files, and check the categories you want to remove. Alternatively, go to Settings > System > Storage and enable Storage Sense to automatically free up space. These tools skip files that are in use and don't cause the error.
Frequently Asked Questions
Why does the error say "The requested resource is in use" even after I close all apps?
Background services like Windows Search, antivirus, or cloud sync may still hold the file. Restarting the computer is the most effective way to clear all locks. If it happens repeatedly, check which app reopens at startup and disable it temporarily.
Can I use a third-party tool to unlock a file?
Yes, there are free tools like LockHunter or OpenedFilesView that show which process locks a file and allow you to release it. However, these are third-party and not officially supported by Microsoft. Use them at your own risk, and always close the locking process properly rather than force-killing it if possible.
What if the error occurs on a system file like DLL or EXE?
System files are often locked by critical services. Do not force-delete them. Instead, run sfc /scannow in an admin Command Prompt to repair system files, or use Windows Update to fix issues. Forcibly deleting system files can break Windows.
Does this error occur on Windows 10 and Windows 11 alike?
Yes, both versions show the same message. The troubleshooting steps are identical. The only difference might be the wording of menus (e.g., "Terminal" vs "Command Prompt"), but the underlying process is the same.
Is there a way to prevent this error from happening?
Close files before moving or deleting them, avoid opening files directly from USB drives and then removing the drive, and keep your system updated. For cloud-synced files, pause sync before modifying them. These habits reduce the chance of encountering the error.