How to prevent a folder to be deleted in Windows

I want to make a folder in Windows 10 to be protected from deletion.

I am trying to protect "Downloads" folder. I tried setting rules in Properties -> Security -> Advanced. It has no effect. I tried both adding "Deny" rule on "Delete" for "Everyone" and removing "Allow" on "Delete" in existing rules. After doing those changes I was able to delete folder. Popup menu shows "Administrator" icon next to the "Delete" button, but there is no confirmation dialog, when I press it.

I know that there are many similar questions here but none of them has a solution (except placing a binary into the folder and making sure that it runs all the time).


Solution 1:

Some ways to prevent deletion:

  • Modify ownership of the folder.
    • Right-clik the folder and select Properties.
    • On the Security tab, select Advanced.
    • On the Permissions tab, Disable inheritance, removing all inherited permissions.
    • This denies permission to do anything to that folder, until you assign an owner and set permissions for that owner. Of course, that owner should be able to delete the folder... so you might want to create a new user for that purpose.
  • Use third-party software, such as TunesBro Folder Unbreak or an alternative. N.B. Check reviews and use VirsuTtoal to look for malware before installing any software.