I came across this problem that we cannot delete certain folders in vista and it gives the message “Destination Folder Access Denied”.

This happens because you dont the right ownership to the folder inorder to delete it or make changes to it. what we can do here is to get the rights back. Also this can happen when you try to delete Windows.old or in my instance another directory on a hard drive like Windows or Program Files you want to erase, but Vista won’t let you because you don’t have the proper permissions because the folder ACLs were made for User Accounts with SIDs on an older partition. Even with Administrator privileges
Well you can take ownership back with two command-line utilities:
takeown - which does exactly that. It allows you (current user) to take ownership of a file or directory
icacls -setsup new ACLs on that directory for you
The best way to do this is to create a batch command like ownrbck.cmd copy n paste,the lines below n save:
takeown /f %1 /r /d y
icacls %1 /grant administrators:F /t
You will need to run this in an elevated command prompt, you can run a command such as:
ownrbck d:\windows
This will reset ownership and ACLs on the windows directory such that a commands like:
del and rd /s d:\windows should work.
and then delete the folder.