1

Honestly, I'm a little disappointed this is so hard and isn't intuitive to do, because it seems a trivial task. I want to prevent a folder from being inadvertently deleted by myself, but not files and subfolders inside. How can I achieve this?

Oleksa
  • 111
  • 1
  • 1

1 Answers1

0

It would be best to create an explicit deny ACE for the folder telling Windows a user or group cannot delete the folder itself.

Right-click the folder → PropertiesSecurityAdvanced then click Add. In the Permission Entry window for your folder, click Select a principal.

Next, in the Select User and Group window, in the text box, enter the user's name (yours in this case) and press ENTER.

Change type to Deny and select Show advanced permissions, click Clear All, then check Delete.

Now click Ok in the Permissions Entry window, then click Ok again in the Advanced Security window, before finally click Ok one last time in the folder properties window.

Now right-click the folder → Delete. A popup should appear telling you you cannot delete the folder without modifying the permissions.

Note, however, the only disadvantage to this is that you cannot open the folder in File Explorer without agreeing to modifying the permissions. You can beforehand create the subfolders inside of it before you do this or you can access and create the file and folders through the command line if they do not exist yet.