Every experienced PC user is likely familiar with error messages along the lines of „This file is still in use“. Unfortunately, while Windows is quite keen on educating users on their lack of access, it doesn't always tell which program is to blame for the dilemma. Here's how to successfully deal with locked files.
When a file is classified as “in use” by Windows, it is typically still opened by another process that is or could be making changes to it. In many cases, Windows 7 and 8 even point you directly to the program in question with their error messages, allowing you to simply close it and try again. Typically though, this doesn't tend to be the case. If the file is displayed as “in use” but there's no indication of a program whatsoever, you have two options to proceed: You can either use the handy tool Unlocker, which integrates itself into the Windows UI seamlessly, or delete or rename files over the command prompt without any third party software.
See also: How to use Windows 8's new file explorer
Method 1: Using Unlocker
The most comfortable method of finding out which program is using particular files is offered by the freeware Unlocker. Download the tool and install it. This will give you an additional entry in the context menu called “Unlocker” that allows you to get an overview of all the processes that are currently trying to access this file. Choose an operation from the drop-down menu and click on “Unlock all” to close all so-called “Handles” that are blocking access to the file and to apply your operation of choice.
Method 2: Via the command line tool
The other method is slightly more complicated, but doesn't require any third party software to do the job. If a file is “in use” and can't be deleted or renamed,
This might also be of interest: What to do when Windows Explorer doesn't refresh
1. Hold down the Windows-key + R and enter “cmd” into the empty field. Confirm with “OK”.
2. Type “del” or “ren” into the prompt, depending on whether you wish to delete or rename the file, and hit space once.
3. Drag and drop the locked file with your mouse into the command prompt. If you wish to rename the file, you need to attach the new name for it at the end of the command (with the file extension).
4. You will need to close the Windows Explorer to release the lock on all files in use. To do so, first close all Explorer windows and open up your task manager with “Strg-Shift-Esc”. Switch to the tab “Processes”.
5. Look for the entry “explorer.exe”, mark it and click on “End Task” (if there are multiple entries called explorer.exe, you must close them as well). Its perfectly normal for your Windows UI to disappear as a result, so there's no need to worry about that.
6. Switch over to your command line tool and hit enter to activate your prepared command. If everything has gone well, your file should be deleted or renamed without any hassle.
7. To bring your Windows UI back, head back into the task manager and open the menu option “File”. Select “New Task (Run)” and enter “explorer” into the empty field. This will restart the “explorer.exe” that you closed earlier and restore Windows as you know it.
This article is based on a segment by our sister publication PCWELT.de.