Home > Article > System Tutorial > What should I do if I cannot delete the windowsapps and ProgramFiles folders on the D drive of win10 system?
php editor Banana will introduce to you a solution to a common problem: when using Win10 system, sometimes we will encounter the situation that we cannot delete the windowsapps and ProgramFiles folders under the D drive. This may be because these folders are occupied by the system or the permissions are set incorrectly. There are many ways to solve this problem, which can be solved by modifying the folder permissions, deleting it with administrator rights, or using command line operations. Below we’ll detail how to fix this problem and let you delete these folders easily.
What should I do if I cannot delete the windowsapps and ProgramFiles folders on the D drive of win10 system?
Method 1:
1. If there is no data on the D drive, you can right-click on "This PC" or right-click on the Start menu to select [Computer Management].
2. Click [Disk Management] on the left, select D, right-click, select [Delete Volume], yes.
3. After deleting, right-click again, select [New Simple Volume], then continue to the next step, and finally click [Finish].
Method 2:
1. Execute the command prompt (cmd) as an administrator.
2. Enter: takeown /F “D:\Program Files” /A /R /D Y
and press Enter.
3. Enter: icacls “D:\Program Files” /T /grant administrators:F
and press Enter.
4. Enter: rd /s /q "D:\Program Files"
Press Enter to delete the corresponding folder.
Note: What I deleted above was the Program Files folder in the D drive. As for the WindowsApps and Program Files folders on other drives, just replace the path and file name.
The above is the detailed content of What should I do if I cannot delete the windowsapps and ProgramFiles folders on the D drive of win10 system?. For more information, please follow other related articles on the PHP Chinese website!