How to prevent files from getting deleted in Windows 10

You might have come across a situation where an important file gets deleted from your system accidentally. If it is stored in the recycle bin, it can be recovered, if not this file is lost forever.Sometimes, the folder gets moved or accidently renamed and then searching for it becomes difficult especially when the same system is shared by many people. In order to avoid such situation, Windows provides various methods to protect them.

In this article, let us discover various of protecting the files and folders from being deleted.

Method 1: Alter the Security Permission of the File/ Folder

Step 1: Locate the file/ folder that is to be protected, right-click on the file/folder and choose Properties

 

 

File Properties

 

 



Step 2: In the Properties window that opens,

  1. Go to the Security tab
  2. Under Group or Usernames section, click on the Username that you want. For example, let us choose SYSTEM
  3. Now, Click on the Edit button

 



 

Properties

 

 

Step 3: In the Permissions window that shows up,

  1. Tick on all the options under Deny Category as shown below
  2. Click on Apply
  3. Click on OK

 

 

Permissions For Test Folder

 

 

Step 4: A warning appears as shown below, Click on Yes

 

 

warning

 

 

With these changes, the User with the Username selected above(SYSTEM in our case), will not be able to delete the file.

Step 5: In case, you want to revert the changes, In the Permissions for TestFolder Window,

  1. Untick on all the options under Deny Category as shown below
  2. Click on Apply
  3. Click on OK

 

 

Allow Permission To The Users

 

 

Method 2: Change the Advanced Security Permissions of the File/ Folder

Step 1: Look out for the file/folder that is to be protected, right-click on the file/folder and choose Properties

 

 

File Properties

 

 

Step 2: In the Properties window that opens,

  1. Go to the Security tab
  2. Under Group or Usernames section, click on the Username that you want. For example, let us choose SYSTEM
  3. Now, Click on the Advanced button

 

Advanced

 

 

Step 3:The Advanced Security Settings window opens, click on the Disable inheritance button at the bottom left corner.

 

 

Advanced Security

 

 

Step 4: Block inheritance window shows up. Click on Convert inherited permissions into explicit permissions on this object.

 

 

Block Inheritance

 

 

Step 5: In the appearing window,

  1. Click on the User. This user will not be able to delete the file.As an example, let us choose SYSTEM
  2. Now, press on Edit button

 

Choose System And Edit

 

Step 6: In the Permission Entry window,

  1. Choose Deny in the Type drop-down
  2. Click on Show advanced permissions link, to look at more permissions available.

 

 

Deny And Show Advanced Permisssions

 

Step 7: From the expanded list of permissions,

  1. Tick on Delete, Read permissions, Change permissions, Take ownership. If you want, you can choose any other from the list as well.
  2. Click on OK

 

Tick And Ok

 

 

Step 7: In the Advanced Security Setting window,

  1. Click on the Apply button
  2. You will see a Windows Security Warning as shown below, click on Yes
  3. Finally, press OK

 

Final Step

 

With these settings in place, if the user with a username SYSTEM tries to delete the file/ folder, the File access denied window will be shown, and the user will be asked to log in as administrator.

Method 3: Hiding the File/Folder

You can choose to hide the file from the view so that accidental deletion can be avoided. To do so:

Step 1: Search for the file/folder that is to be protected, right-click on the file/folder and choose Properties

 

 

File Properties

 

 

Step 2: In the properties window that opens,



  1. Make sure you are in the General tab
  2. Under the attributes section, click on Hidden
  3. Now, click on Apply
  4. Finally, click on OK

 

Hidden

 

Now, this folder will be hidden. By default, the hidden files cannot be viewed in the file explorer. However, with the slightest setting, it can be viewed again. If you want to disable the Hidden Files view, follow the below steps.

1: Open the Run window by holding Windows+r keys from your keyboard at the same time.

2: Enter explorer in the Run window and hit enter 

 

Explorer

 

3: In the explorer window that opens , from the top menu options,

  1. Select the View tab
  2. Click on Options
  3. Select Change folder and search options

 

 

View Tab

 

 

4: In the Folder Options window that opens,

  1. Go to the View tab
  2. Under the Hidden files and folders section, Check the Don’t show hidden files, folders, or drives
  3. Click on Apply
  4. Finally, Click on OK

 

Final View

 

With these two changes, the important files/folders can be hidden and the option to see the hidden files and folders can be disabled.

That’s All. We hope this article has been informative. Thank you for Reading. Kindly comment and let us know which of the above methods helped you.