Sometime you need to reset folders NTFS permission, it could be after restore from backup or virus attack for example. You should first take ownership on the folders, From command prompt running as administrator execute inside the folder to be reset recursively :
takeown /F * /A /R /D Y
Then you need to reset the permissions on the folders, execute :
ICACLS * /T /Q /C /RESET
After that the NTFS permission will be reset to default and you will need to re-assign the right permission
If you just want to delete the files or folders and you still get “access denied” on all file and folders, you can use tools like this :
https://www.wisecleaner.com/wise-force-deleter.html
I find it very useful and it did the trick