Saturday, March 9, 2013

Windows 7/8 Grant Permission for Deleting Folders

Make a batch file named "delete.bat" and enter the following:

SET DIRECTORY_NAME="D:\NAME OF LOCKED FOLDER"
TAKEOWN /f %DIRECTORY_NAME% /r /d y
ICACLS %DIRECTORY_NAME% /grant administrators:F /t
PAUSE

This should give you the ownership to the folder you want to delete.

No comments:

Post a Comment