We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
2,808 Tutorials

How to delete or rename files "in use"

Vanquish annoying file restrictions by Windows

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. 1. Hold down the Windows-key + R and enter “cmd” into the empty field. Confirm with “OK”.

  2. 2. Type “del” or “ren” into the prompt, depending on whether you wish to delete or rename the file, and hit space once.

  3. 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. 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. 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. 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. 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.

IDG UK Sites

Nokia Lumia 930 review: The flagship Windows Phone 8.1 smartphone

IDG UK Sites

Live Blog: Apple financial results, record June quarter, 35.2m iPhones sold, $37.4b revenue

IDG UK Sites

Welcome to the upgrade cycle - you'll never leave

IDG UK Sites

Why smartphone screens are getting bigger