Link to home
Start Free TrialLog in
Avatar of suraj badhe
suraj badhe

asked on

“Delete” and “Delete subfolders and files” permissions must be set to “Deny” using batch-script or power-shell or an other way

Hi All,

Want to apply “Delete” and “Delete subfolders and files” permissions must be set to “Deny” for following folders:
o D:\AB\2100\Data
o D:\AB\2100\DataStore
o D:\AB\MicroSEQID\data\DataStore
o D:\ABC\2100 Data*

can we write a batch file to make the same change of DENY to all the folder in one go.
Avatar of Qlemo
Qlemo
Flag of Germany image

Are you aware that this also prohibits renaming?
I'm on mobile now, not able to look up the necessary details, but have you considered using the icacls tool?
Avatar of suraj badhe
suraj badhe

ASKER

Yes, i know that it prohibits renaming.
icacls tool?
icacls.exe is part of Windows, you can run it in a command prompt. You can try yourself ...
Not worth a script. Try icacls as suggested. Not a Java question either!
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, Qlemo.

It works.
Could you please let me know if I have to Allow "delete and Delete subfolders and files"  permission to some of the subfolders from the folder to which we have applied deny permission.

EX:
D:\AB\2100\DataStore - Deny "delete and Delete subfolders and files"
D:\Applied Biosystems\3500\DataStore\PlateRecord - Allow  "delete and Delete subfolders and files"

Here i want to apply "delete and Delete subfolders and files" permission to allow for some of the subfolders and it should be denied for the main folder.Could you please help me with that.
That is more difficult. A Deny permission trumps Allow, so you'll have to remove inheritance and set up an own set of permissions.
Hi,

Could you please help with some example.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Solutions given by Qlemo and NVIT.