Access Denied Deleting folder
Can't delete a foler / file, getting access denied even if you KNOW the file/folder is not in use? Here you go. This adds a Reg entry that will cause the corrupt file/folder to be MOVED, and subsequently deleted, upon next server reboot.
If not already there, create an entry IN:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\
named PendingFileRenameOperations of type REG_MULTI_SZ
Then, in the newly added entries box you need to enter PAIRS of entries for each file/folder you want to remove/Move. The first of a pair is preceeded by \\??\ and then the path of the file folder to manipulate, like d:\hosting\Folder1\Folder2\Folder 3 (or ending with file like test.txt .
Second of the pair is WHERE to move the file/folder TO during the restart and is preceeded by !\\??\ and then the path of the NEW location.
Here is a pair to remove a folder named "Controls"
\\??\D:\files\old\Controls
!\\??\C:\Temp\Remove
Sample of file:
\\??\D:\files\old\Controls\test.dll
!\\??\C:\Temp\Remove\test.dll
Reboot the server and then check for folder or file being deleted.
For safe sake, go back to reg entry and see if the key still exists and, if so, remove the pairs. If not, and you recreate a folder / file by same name....next time you reboot it iwll delete it. My experience is that Reg key is elimnated after it runs.