Once in a while you might come across a file that simply cannot be deleted no matter how much effort you put into it. Its a common annoyance in windows and I have encountered it a lot of times. There are many reasons why windows won’t let you delete some files. Usually the file might be in use by windows or any other programs, which is why windows wont let you delete it. Although chances of a malware infection can be the cause, but its not a common case.
Generally in windows a file can be assigned and used by only one program at a time. This process is called as the file locking mechanism in windows and many a times due to some bugs in the file locking mechanism, you might not be able to delete some locked files. Here are some errors that you will usually encounter when you try to delete a file which is currently being locked by windows.
- Cannot delete file: Access is denied
- There has been a sharing violation
- The source or destination file may be in use
- The file is in use by another program or user
- Make sure the disk is not full or write-protected and that the file is not currently in use
Although for some files, you can kill the program thats using the file and you will be able to delete it. In case you still not able to delete these files then you can make use of Unlocker, a free tool that will unlock these files and delete them. Here is how you can use unlocker to unlock files that are currently in use by windows or other programs and delete them.
- Step 1: Download and install Unlocker from this link.
- Step 2: Run unlocker and navigate to the file which you want to delete.
- Step 3: Unlocker will then show you the program that is currently using the file.
- Step 4: Select the process and click on Kill process to end the process. If the process cannot be ended then try to unlock it.
Once the file is unlocked, you can then proceed to manually delete it. You can also use Unlocker to Delete, rename, move or copy locked files in windows.