Bạn đang xem: Fixed: you need administrator permission to delete this file
Why is Windows 7 not letting me delete the folder?
I am not sure why this happens but there is a workaround.
To take control of the thư mục containing the undeletable create a text file called “delete.bat” and add the following lines khổng lồ it:
SET DIRECTORY_NAME="C:Locked Directory"TAKEOWN /f %DIRECTORY_NAME% /r /d yICACLS %DIRECTORY_NAME% /grant administrators:F /tICACLS %DIRECTORY_NAME% /reset /TPAUSEYou will need to change the directory path lớn match your requirements e.g. “C:Locked Directory” lớn “C:Delete Me”.
Right click on the tệp tin “delete.bat” select “Run As Administrator” and you should now have full control of the directory and all sub directories meaning you can vì what you wish with them.
Xem thêm: Trò Chơi Đua Xe Online, Offline Hay Nhất Cho Điện Thoại Android
The only way was khổng lồ delete files starting from the lowest level folder in that folder. I got that error message with every folder which had subfolders. I deleted all files/subfolders working my way up.
A thư mục can disallow a parent from overwriting its permissions, so it stops working at a certain depth.
Use Process Monitor và filter for ACCESS DENIED events to figure out this depth
Every time an ACCESS DENIED event occurs change the permissions as explained by
Sahil.
You can use Handle too see what processes are opening files within your folder.
handle C:PathToFolderYouAreTryingToDeleteExample: