This device is currently in use is a Windows error that appears when a program or background process is using a file or folder you are trying to rename, delete, or eject. It means the operating system has locked the item, and you must close the program or end the process before Windows will let you change it. Below is a full breakdown of why this happens, how to find the culprit, and the safest ways to resolve it.
What Does the Error Actually Mean?
Windows locks files and folders that are open by an application, a system service, or another user session. The lock prevents data corruption by stopping two programs from writing to the same file at once. When you try to modify or remove a locked item, Windows shows the message “This device is currently in use” or “The action can’t be completed because the folder or a file in it is open in another program.”
The error is not a bug or a virus. It is a normal safety feature. The problem is that Windows often does not tell you which program holds the lock, so you have to find it yourself. Common culprits include:
- File Explorer windows that have the folder open
- Media players (VLC, Windows Media Player) playing a file from that folder
- Word, Excel, or PDF readers that have a document open
- Antivirus or backup software scanning the file
- Cloud sync apps (OneDrive, Dropbox) uploading or downloading
- Windows Search indexer or thumbnail generator
Why Does It Happen on USB Drives and SD Cards?
Removable drives trigger the error more often than internal drives because you usually try to eject them while something is still reading or writing. Even if you closed the app, a background process like Windows Search may still be indexing the drive. The “Safely Remove Hardware” feature checks for open handles and refuses to eject until they are released. If you force-eject anyway, you risk file corruption or a damaged file system.
How to Find Which Program Is Locking the File
Windows does not have a built-in tool that names the locking process directly. You have to use the built-in Resource Monitor or a third-party utility. Here are the most reliable methods:
- Use Resource Monitor: Press Win + R, type
resmon, and press Enter. Go to the CPU tab, expand “Associated Handles,” and type the file name or drive letter in the search box. The list shows which process has that file open. - Close File Explorer previews: If the folder is open in a window, close it. Also check the preview pane (View > Preview pane) because it locks the selected file.
- Restart the app: Close all programs you were using, especially office suites, media players, and image viewers.
- Use a third-party tool: Programs like Process Explorer (from Microsoft Sysinternals) or LockHunter let you right-click a file and see which process holds it. These are free and widely used.
If you cannot find the process, the simplest fix is to restart Windows. That clears all locks except those held by system services that start automatically.
How to Fix It Without Losing Data
Once you know the process, you can close it normally or end it in Task Manager. If you end a process that has unsaved data, you will lose that data. So try these steps in order:
- Close the program normally (File > Exit).
- If the program is hung, use Task Manager (Ctrl+Shift+Esc) and select End task.
- For USB drives, use the system tray icon “Safely Remove Hardware and Eject Media” after closing all apps.
- If the drive still refuses to eject, log off and log back on, or restart the PC.
- As a last resort, you can force-eject by holding Shift and clicking “Eject” in File Explorer, but this is risky and can corrupt data.
Common Misconceptions
Many users think the error means the device is physically broken or that Windows is “stuck.” Neither is true. The message is a lock, not a hardware failure. Another misconception is that deleting the file from a different folder or using a command prompt will bypass the lock. It will not — the lock applies system-wide. Also, some people believe that disabling Windows Search or antivirus will fix it permanently. That can reduce the frequency, but any app that opens a file will still cause the error when you try to modify that file while it is open.
How to Prevent It in the Future
You cannot prevent the error entirely because it is a necessary safety feature. But you can reduce how often you see it:
- Close programs before trying to rename or delete files.
- Do not keep media files open in a player while you try to eject the drive.
- Pause cloud sync and backup software before ejecting a drive.
- Disable the File Explorer preview pane if you frequently work with large folders.
- Use the “Safely Remove Hardware” option every time.
Frequently Asked Questions
Why does “This device is currently in use” appear even when I have no programs open?
Background processes like Windows Search, antivirus scanners, or the thumbnail generator can hold a lock without any visible window. The most common hidden culprit is the File Explorer preview pane, which locks the selected file. Check Resource Monitor to see exactly which process has the handle.
Can I force delete a file that is locked?
You can, but it is not recommended. Force-deleting a locked file can corrupt the file or the file system. If you must delete it, first try closing the program, then use Task Manager to end the process, then delete. If that fails, restart the PC and delete immediately after boot.
Does this error happen on Mac or Linux?
Yes, all operating systems lock files that are in use. Mac shows “The operation can’t be completed because the item is in use,” and Linux shows “Target is busy” or similar. The causes and solutions are the same: find the process and close it.
Is it safe to eject a USB drive without using “Safely Remove Hardware”?
In most cases, Windows uses write caching, so data may not be fully written to the drive when you see the “copy complete” message. Ejecting without the safe-remove option can lead to data loss or corruption. Always use the safe eject icon if the error appears.
Will restarting my PC always fix the error?
Restarting clears all user-session locks, so it will fix the error in almost all cases. The only exceptions are system services that start automatically and lock files at boot, which is rare. If the error reappears immediately after restart, a startup program is the cause.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Backup Not Enough Space? Fix It Now200.00 GB
- Approximate Match Lookup: Conditional Formatting
- GST on Delivery Charges in India: E-Commerce Rules
- DOD Disk Wipe: What It Is and How to Use It
- NFC Reader on Your Phone: 9 Things You’re Not Doing
- Smart TV DNS Settings: Why They Change & How to Fix