How To: Delete/edit files that are ‘in use’

    While working with Windows, you will have undoubtedly encountered this error. You might try to rename or delete a file yet Windows will simply display an error that says the file is currently in use and you will be unable to make any changes to it. Sometimes, the open files are easy to spot. For example, you might have an open document. In these situations, you can easily close the file and then rename or delete it so the solution is simple. Other times, however, the file will be occupying a process and the solution is not that simple. There are various ways to get past this and we will try to cover them all.

    1. Using built-in Windows features

    The first thing you should definitely do is find the file’s process in the Task Manager. If you know that the file is not an important system process, simply kill it and this will free up the file. This is obviously the simplest solution but it will not always work. Furthermore, some files are not presented in the processes and you will have trouble finding them and ending them.


    The other option is to use the command prompt. This is a lot more complicated and it is fairly circumstantial. Sometimes it will simply not let you access the files so you will be unable to make any changes to them. To try out this option, you will first need to open the command prompt. You can do this by typing “cmd.exe” in the Search box or by pressing Windows Key + R and typing in “cmd”. If you want to delete a file, type in “del”. If you want to rename a file, type in “ren”. After you have typed your command, drag and drop the file you want to change in the command prompt. Deleting the file requires no additional input but if you want to rename it, you will need to insert the new file name at the end of the command, along with its extension. After you have inserted your command, do not press Enter. Instead, open the Task Manager, find the “explorer.exe” process and end it. This will make the Windows Explorer disappear but do not worry. You can now go back to the command line tool and press Enter. If you get an error, you will have to find another way to work with the files.


    2. Unlocker


    This is a fantastic and very lightweight tool that has helped me throughout my years of Windows usage. It always stays on and integrates itself with Windows perfectly. Download from the provided link and install it. Be wary of the extra software that the installer will try to force though. It will not have any icon in the system tray or anywhere else but it will be running in the background. If you try to make changes to a file and Windows refuses because it is in use, simply right click on the file and choose the Unlocker option. A new window will open and you will have a lot of options, including unlocking the process or killing it.