As an administrator you often get the above error when you try to delete a folder. Obviously, my first thought was a permissions issue, but knowing how Windows works, you can never trust the error message either. Unfortunately, when dealing with the “You don’t have permission” issue, it’s either an actual permission issue or it’s because the file or folder is locked by a process.
Even though you have corrected the permission issue or took ownership of the said folder, still you will get error’s about permission issue or the file name length is too long etc..
Here are a few steps to delete the folder from your server.
Run the following command with elevated privilege.
If {Folder Path} has sub-folders, and/or possibly containing files, they may themselves be owned or secured in a way that continues to prevent removal of the parent folder.
Use takeown /f {Folder Path} /r as the /r adds recursive ownership modification to sub-folders and files.
Likewise, use cacls {Folder Path} /G administrators:F /t as the /t applies DACL changes recursively to sub-folders and files.
If you still can not delete files and folders after you have successful done as previous instructions, you will need run cmd and use this command:
rd <folder name> /s/q
I hope you can do it.
Disclosure: Some of the links on are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission.
The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers.
By using the affiliate links, you are helping support the VOUdeals website, and we genuinely appreciate your support.