Monday, October 26, 2020
Home How To How to Delete Locked Files in Windows 10 via CMD (Command Prompt)

How to Delete Locked Files in Windows 10 via CMD (Command Prompt)


Well, if you have been using Windows 10 for a while, then you might know that the operating system comes with lots of pre-installed apps. Also, a few software refuses to uninstall. Well, you can easily remove stubborn programs by using a third-party software uninstaller, but what about the locked files?

Sometimes, while deleting a file in Windows 10, we come across an annoying dialog box indicating that the file is locked, or we are not allowed to perform such action. In such cases, we need to use the Command Prompt.

The good thing about using Command Prompt is that you won’t need to spend money purchasing premium file & folder remover. Command Prompt is a built-in feature of Windows 10, and it works pretty well.

Delete Locked Files in Windows 10 via Command Prompt

With the command prompt, you can delete any file or folder on the Windows 10 operating system. So, in this article, we are going to share a detailed guide on how to delete locked files in Windows 10 computers in 2020. Let’s check out.

Step 1. First of all, open the Windows Search box.

open the Windows Search box

Step 2. On the Windows Search box, search for ‘CMD’

search for 'CMD'

Step 3. Right-click on the ‘CMD’ and select the option ‘Run as administrator’

select the option 'Run as administrator'

Step 4. Now you need to navigate to the folder where the file is stored.

Find file path in Windows: Right Click > Properties > Details

find file path

To navigate the folder, use the command:

cd folderpath

Execute the command

Note: Replace ‘folderpath’ with the actual path where the file is stored. For example, cd C:Userstechviraldesktop

Step 5. After navigating to the folder, you need to execute the delete command. Simply, execute the command given below.

del /f /s <filename>

Execute the command

Note: Replace the <filename> with the actual name of the file. Also, put the extension of the file type. For example, del /f /s notepad.txt

Step 6. Now on the Command prompt, type ‘Y’ and press the Enter button.

That’s it! You are done. This is how you can delete locked files in Windows 10 via Command Prompt.

Deleted file

So, this is all about how to delete locked files in Windows 10 via the command prompt. I hope this article helped you! Please share it with your friends also. If you have any doubts related to this, let us know in the comment box below.

Leave a Reply

Most Popular

How To Create A Secure Backup Before Upgrading To iOS 14

After months of beta testing, Apple has finally released the stable build of iOS 14 and iPadOS 14. Anyone who owns an iPhone...

How to Add Custom DNS Server On Android in 2020

Domain name System or DNS is an important process that matches the domain names to its IP Address. When you enter a URL...

30 Must Have Essential Softwares For Windows PC in 2020

Windows 10 is right now the most popular desktop operating system. Windows is always known for its massive software ecosystem. The good thing...

How To Record Screen On Android Without Root (No Root)

Today there are more than billions of people who are using Android right now. This operating system relates to Google and compared to...

Recent Comments