Locked file delete windows

How to delete locked files on Windows 10

When a file is open by another app or process, Windows 10 puts the file into a locked state, and you can’t delete, modify, or move it to another location. Usually, after the file is no longer in use, the application will unlock it automatically, but that’s not always the case. Sometimes, a file may not unlock successfully, and even if you try to take any action, you’ll see a warning that the operation can’t be completed because it’s open by another program.

If you must delete or take different actions with a locked file, there are at least two methods you can use to unlock it, including using Microsoft’s Process Explorer tool and Safe Mode.

In this Windows 10 guide, we walk you through the steps to get rid of files even if they’re locked by an app or process.

How to unlock files using Process Explorer

If you need to unlock a file currently being used by a program or system process and you can’t restart your device, you can use these steps:

  1. Download Process Explorer from this Microsoft website.
  2. Extract the content inside the ProcessExplorer.zip compressed folder. (You can refer to these instructions if you need additional help on how to do this task.)

Double-click the procexp.exe if you’re running a 32-bit version of Windows 10 or procexp64.exe if you’re running a 64-bit version10 to launch the app.

Click on File, and select the Show Details for All Processes option.

Click on Find, and select the Find Handle or DLL option.

Type the name of the locked file in the field, and click the Search button.

Behind the search window, in «Process Explorer,» right-click the locked file, and select Close Handle to unlock it.

  • Important: If the file is being used by more than one process, repeat the steps to close all handles.

Once you complete these steps, you can go ahead and safely delete or modify the unlocked file.

How to unlock files using Safe Mode

Usually, when you come across a locked file, you can simply restart your device to unlock it. However, if the application has a service that loads during startup, it might keep locking a file as soon as you sign in. You can either disable the app from loading at startup, or you can boot into Safe Mode to unlock and delete the file. Here’s how:

  1. Open Settings.
  2. Click on Update & Security.
  3. Click on Recovery.

Under «Advanced Startup,» click the Restart now button.

Click on Troubleshoot.

Click on Advanced options.

Click on Startup Settings.

Click the Restart button.

On «Startup Settings,» press F4 to enable Safe Mode.

While in Safe Mode, use File Explorer to locate and delete the files that were previously locked, then simply restart your device as you would normally to exit Safe Mode.

Wrapping things up

Although there a number of tools available on the internet designed specifically to deal with locked files, on Windows 10 there is more than one way to remove these type of files without having to get software from unknown sources.

It’s important to note that unlocking and deleting files on Windows 10 may cause system and program issues, depending on the type of files you’re trying to unlock. So be careful of what you delete if you’re not sure of the consequences.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

We may earn a commission for purchases using our links. Learn more.

Halo: MCC’s live service elements make it better, not worse

Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.

Microsoft’s Surface Duo is not ‘failing up’

Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.

Here’s what you can do if Windows 10 update KB5001330 is causing issues

In this guide, we’ll show you the steps to get rid of the update KB5001330 to fix profile, gaming, and BSoD problems with the Windows 10 October 2020 Update and May 2020 Update.

These are the best PC sticks when you’re on the move

Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!

How to delete locked files or folders

Computers are designed to be smarter than the people who use them. And for the majority of times, they indeed are, helping us to execute wildly complex tasks faster and with remarkable efficiency. But sometimes they confound us by failing to complete tasks that seem straight forward even to us.

An example is when your Windows computer refuses to delete a file or folder. Other times it will also refuse to move or rename a file. The computer will give you different reasons for refusing to delete your selected file. It will tell you:

  • The file, its source, destination or directory may be in use by another program
  • Access is denied
  • There is a sharing violation somewhere
  • That the file is unreadable or is corrupted, etc.

Of course, if the computer tells you the file is open in another program, usually one you have opened yourself, closing that program first should unlock the file or folder for deletion. That should be straight forward. But there are cases, as with some background processes, where you can’t immediately tell which program currently has the file open.

How to delete locked files

Just to be sure, Windows system files are locked for a reason. In case you end up in the Registry while trying to fix something, avoid deleting any files or folders there. If unsure what to do, consult a professional. But for locally stored files that you know are safe to delete, but for some reason won’t oblige, there are a few tricks you can try;

Solution 1 — Restart your computer

Sometimes exiting the programs you are in and restarting your computer maybe all you need to delete a stubborn file. Restarting the computer reboots your system and clears it of any temporary bugs that may have locked your file.

But when it is the Windows startup program itself that is locking your file, simply restarting the computer may not unlock it. If you notice restarting the computer isn’t doing the trick, try restarting it in safe mode and deleting the file, before considering other fixes. You can switch back to normal mode after you have deleted the file.

Solution 2 — Use Windows’ Command Prompt

A quick way to force file deletion is to go the CMD route. Open the Run dialog box, type in cmd, and hit the enter key. Once you are in command prompt, type del /f file name and press enter key.

Remember to replace file name with your own file’s name. This should delete the file. However, please note you won’t be able to retrieve the file once you have deleted it this way.

Solution 3 — Use third party file deleting software

Another way to delete a locked file is by using third party software that’s specially written for the purpose. There are several options available, but Unlocker is a popular one. Some of these will also make it painless to rename and move locked files.

Most third party software for deleting locked will require you to download and install them on your computer. However, there are others, like the Process Explorer task manager, are portable and won’t require you to install them on your machine.

Process Explorer is particularly useful as it also shows you which processes are currently running at a given time, as well as the processes’ owning accounts.

The Process Explorer software gives you greater insight into the Windows OS. Among other functions, the tool can tell which process is running any open window, suspend or kill a running process, and, importantly, figure out which process has locked the file you are trying to delete.

Any one of the solutions we have discussed here should help you delete any file you may have been struggling with and, hopefully, put you back in command of your machine again. If you find this problem cropping up repeatedly, you should consider cleaning your computer. There is always a possibility a stubborn bug or virus attack could be messing with your files.

RELATED ARTICLES YOU NEED TO CHECK OUT:

How to remove locked files & folders on Windows 10 PC

  • Dealing with stubborn files and folders can be a nuisance. Even so, we have the right fixes for you.
  • To remove those locked files in no time, you can try to delete them from Command Prompt.
  • Take a look at these great file encryption software tools as well. In this way, you’ll be able to prevent similar situations from happening in the future.
  • Don’t be shy to explore our File Removal Hub too. You won’t walk away disappointed.

For a Windows user, it’s possible that at one time or the other, there might be a situation in which the computer’s disk space gets crowded.

There might be attempts by the user to get rid of unneeded files without success.

When trying to delete an unneeded item, an annoying dialog box pops up, indicating that the action is not permitted as a result of a locked file.

The inability to delete a file or folder may either be because it’s locked (encrypted with a security code or password) or because the file is open in a program.

Sometimes, it may be a background program that is preventing the file from being deleted. To completely get rid of the locked files/folders, follow the procedures listed below.

How can I remove locked files and folders?

1. Try to install Stellar BitRaser

If you’re unable to delete user folders in Windows 10 using conventional methods, you might want to try a different, more professional approach.

Using dedicated file erasure software such as Stellar BitRaser comes with many advantages one of which is permanently erasing files that are beyond the scope of data recovery.

By securely erasing confidential data from all devices (running on Windows and Mac as well), servers, and partitions, this privacy safeguarding software meets all your media sanitization requirements.

Using it is as simple as a breeze too: all you need to do is download the.EXE file, install the tool, select the items you want to erase, and Delete.

BitRaser

2. Delete the file from Command Prompt

  1. Start the Command Prompt as an Administrator to activate user privileges.
  2. Type CD to open the root folder.
  3. Then type DEL filename (with extension) /F /Q where filename represents the name of the locked file to be deleted.
  4. Press Enter and the file will be gone.

A locked file can be deleted from the Windows Command Prompt. All that is needed is to launch the Command Prompt by typing cmd into the Windows search bar from the Start menu.

Some locked files may not be this easy to remove. This might prompt going the extra mile by trying out the Windows Recovery method described below. Alternatively, you can download software to fix this.

3. Use Windows Recovery

  1. Switch the computer off and insert the windows re-installation disc into the disc drive.
  2. Turn the PC on, and let it boot (not from the hard disk this time but from the disc).
  3. Put the computer into the recovery console mode by pressing the key R on the keyboard: this mode is a troubleshooting option built into windows.
  4. In the recovery mode, go to the location of the locked file using the Command Prompt. For example, a command like cd C: Documents Settings My Documents filename
  5. The pattern given in this example should be followed using the directory of the locked file to be deleted.
  6. After locating the file, it can be removed by typing in del and to leave the recovery mode. Type the command exit and restart the computer.

Windows Recovery is another method by which locked files can easily be deleted. Refer to the above procedure in that regard.

4. Use dedicated software to manage your locked files

There are a number of software tools that can be downloaded and used to manage locked files from the PC. Here are a few options:

4.1. IOBit Unlocker

This is a handy software that can unlock and manage the files and folders to keep them safe and available. What’s more, IOBit Unlocker is incredibly easy to use.

All you need to do is to drag and drop the locked file or folder into the software’s interface and choose the delete option (or unlock, rename, move, copy, and so on, according to your specific needs).

It also provides details about the location of the file and directory alongside the details of the process, so you’ll easily use it even if you’re not a pro.

IOBit Unlocker

4.2. Process Explorer

A renowned software called the Process Explorer comes in a similar format to the Windows Task Manager.

It’s easy to use and doesn’t require installation, all that is needed is to run it and allow administrator permission, then follow these steps.

  1. Go the File menu on the menu tab and choose show details for all processes.
  2. While still on the menu tab, select the Find option, and click on Find Handle or DLL.
  3. Enter the name of the locked folder in the search field of the process explorer task manager.
  4. Choose the locked file and check out the handle in the details section below the window.
  5. In the same manner that the process can be ended on the regular windows task manager: right-click on the filehandle and click on close handle.
  6. You would have effectively stopped it from running in the background and stop it from getting deleted. You can now go back to the file location and delete the file.

4.3. LockHunter

This comes in as a very helpful software. LockHunter also helps in identifying the particular program that is keeping the file locked.

Going forward, the processes can be stopped in an expedited manner before the file gets deleted.

Lockhunter doesn’t permanently remove the file. However, it sends the file to the recycle bin allowing the user the chance of restoring the file if need be.

4.4. FileASSASSIN

This is an easy to use software tool and its line of action is similar to 10bitunlocker. It is useful in deleting locked files especially those that are inaccessible due to a virus or other malware.

  1. Access FileASSASSIN on the computer.
  2. Drag the locked file or folder into the FileASSASSIN text area.
  3. Select how exactly how the file or folder should be deleted from the various menu options and click on execute to get the file deleted.
  4. Access to the files will be possible using the FileASSASSIN thereafter.

Depending on which of these options are a point of interest, deleting a locked file should not pose a problem anymore.

What software are you using to deal with locked folders in Windows 10? Share your experience with us via the comments section below.

Читайте также:  Урок основные понятия windows
Оцените статью