+5 votes
274 views
How to prevent deletion of files and folders in Windows 10

in Help by (552k points)
reopened | 274 views

1 Answer

+3 votes
Best answer

Method 1: Prevent files or folders from being deleted from your Windows 10 computer using the folder properties.
Method 2: Prevent deletion of files and folders in Windows 10 using command line.

On your Windows 10 computer, you will surely store more or less important files as well as files that you do not want to be deleted under any circumstances. However, no one assures you that by mistake or by other users, your files cannot be deleted. Is there a possibility to protect my files so that they cannot be deleted from my Windows 10 computer?

image

Related:  How to hide files and folders in Windows 10

The answer is yes, this can also be really necessary, especially on computers that are shared with more than one user or that do not have the protection of the login screen. Also in Windows 10 you can not only protect files against deletion but also folders. In this way you will protect all the files that this folder may contain..

If you have folders or personal or professional files of great importance, it does not hurt to protect them against deletion or deletion to avoid any unexpected or surprise. Thanks to the functions offered by the Microsoft operating systems we will be able to protect any file or folder, in fact this tutorial will be useful in Windows 10/8/7.

That said, in this tutorial we show you how to protect any file or folder on your Windows 10 computer so that it cannot be deleted / deleted:

Method 1: Prevent files or folders from being deleted from your Windows 10 computer using the folder properties.

- Right-click on the file or folder you want to protect and from the context menu select: Properties ..

image

- In the window that opens, you must go to the Security tab.

- Once here you will have to click on the Edit button..

- This will open a new window in which you will have to select the user account that is active (or the user account for which you want to prevent it from deleting these files or folders).

- At the bottom, uncheck the boxes for the options: Full control and Modify in the Allow column. If you wish, you can also check the boxes of these two options in the Deny column .

image

- Finally click on the OK button to save the configuration.

 

Method 2: Prevent deletion of files and folders in Windows 10 using command line.

Thanks to this method you can create a folder with an elevated command prompt. The limitation given to the folder created through the elevated command prompt is that it cannot be found by searching for it. You can only move files from one side to the other using the move command. The procedure is the next:

- Open the CMD (Command Prompt) as administrator .

- When you are in the CMD you must write the letter of the drive in which you want to create the protected folder. For example: D:

- Once we are in the desired letter you will have to execute the following command:

  md with \  

image

- This will create the "with" folder which you will not be able to access through the Windows file explorer.

- If for any reason you want to delete this folder "with" you will have to do it from the same CMD with administrator rights using the following command:

  rd / s / q with \  

- This method works only for folders and not for files. And Remember that to move folders to or from this folder you can only do it using the move command from the CMD.


by (3.5m points)
edited

Related questions

+4 votes
1 answer
asked Nov 20, 2020 in Help by backtothefuture (552k points) | 227 views
+5 votes
1 answer
asked Oct 15, 2019 in Windows 10 by backtothefuture (552k points) | 269 views
+4 votes
1 answer
asked Nov 20, 2020 in Help by backtothefuture (552k points) | 251 views
+3 votes
1 answer
+4 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users