Tip "You need permission to perform this action ..." When you delete a folder, how to solve?

Win10 system, sometimes you want to delete a folder, prompts "You need permission to perform this action ..."

Here are solutions to be found after the Google I

1. Create a text file, the file name at random, I named it Script.txt

2. Copy the following script into the Script.txt in (where Folder the To the Delete , replace the folder you want to delete the name)

SET DIRECTORY_NAME="Folder To Delete"
TAKEOWN /f %DIRECTORY_NAME% /r /d y
ICACLS %DIRECTORY_NAME% /grant administrators:F /t
PAUSE

3. Rename the Script.txt Script.bat

4. Run as administrator this bat file, after the implementation, we can, as the deleted folder as usual ^ _ ^

参考自:How to delete a folder which ask “You need permission to perform this action. You require permission from…” even you are administrator of that folder. – Welcome to my blog

Guess you like

Origin www.cnblogs.com/buyishi/p/11229022.html