How to delete folders that don't have Administrator Permission to delete?
Copy and paste this script into your plain notepad and save it at delete.bat.
SET DIRECTORY_NAME="D:\WindowsApps"
TAKEOWN /f %DIRECTORY_NAME% /r /d y
ICACLS %DIRECTORY_NAME% /grant administrators:F /t
ICACLS %DIRECTORY_NAME% /reset /T
PAUSE
Don't forget to change your own folder directory name. For example:
D:\WindowsApps to your own D:\ Myfolders