How to delete locked files with the help Command Prompt

Surely users Windows which were never dating "hot" with files perverse (He's document, picture or folder), not nohow deleted let (Cannot delete file: Access is denied. Make sure disk is not write-protected or that the file is not currently in use. Or something like that. And that even if the files / folders are not open as often pretend to be ...) are endangered (or rare species).

If you are in the situation described above and wish at any price to get rid of these files / folders, then you can do it very easily with the help Command Promptacquis (cmd).

How can we delete blocked files (undeletable files) using Command Prompt?

  • First you need to open a Command Prompt with privileges Administrator (type: cmd in Search programs and files in Start Menu, Right click on it and select Run ace administrator). Then open the problem folder (or file containing problem), select the path to it (less C:) And copy it (right click->Copy or Ctrl+v)
  • go back to Command Prompt and type the command cd and give Enter (This will open root folderie C:)
  • key again cd and paste the path to the folder problem (right click->paste. Ctrl+ v does not work in Command Prompt) Then give Enter. That folder will open in cmd (to make sure that you must type the command in the folder dir then let Enter. This command will show you the contents of that folder)
cmd

1. To delete a file in this folder type the command del [numele_fisierului] / F / Q and give Enter (where [Filename] File name is stubborn, F = delete file even if it is Read-Onlyand Q = delete without confirmation)

del_test_file

2. If you want to remove the folder, but it will not disappear from Windows ExploreAfter you have followed the steps above to delete the files in this order type in cmd cd to return to root folder (C :) and then tap rmdir / S / Q [numele_folderului] and give Enter.

del_test_folder

Then close Command Promptand open Windows Explorer. You will notice that the problem folder (test in my case) and implicitly the problem file/files (test.txt in my case) have disappeared.

windows_folders

Success! ;)

Passionate about technology, I enjoy writing on StealthSettings.com since 2006. I have a rich experience in operating systems: macOS, Windows, and Linux, as well as in programming languages and blogging platforms (WordPress) and for online stores (WooCommerce, Magento, PrestaShop).

How to » Curiosity » How to delete locked files with the help Command Prompt
Leave a Comment