How to Delete Locked Files in Windows via CMD
Sometimes, when deleting a file in Windows, we encounter an annoying dialog box indicating that the file is locked or that we are not allowed to act. In such cases, we need to use the Command Prompt.
- Open Windows Search and type CMD. Right-click on the CMD and select the option Run as administrator.
2. Navigate to the folder where the file is stored.
Find file path in Windows: Right Click > Properties > Details
To navigate the folder, use the command:
cd folderpath
Note: Replace ‘folderpath’ with the actual path where the file is stored. For example, cd C:\Users\techviral\desktop
3. After navigating to the folder, you need to execute the delete command. Execute the command given below.
del /f /s <filename>
Note: Replace the <filename> with the file’s actual name. Also, include the file extension. For example, del /f /s notepad.txt
4. On the Command prompt, type Y and press the Enter button.
This article explains how to delete locked files in Windows via the command prompt. I hope it helped you. Please share it with your friends. If you have any questions, let us know in the comment box below.
The post How to Delete Locked Files in Windows via CMD appeared first on TechViral.
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0






Comments (0)