Windows when upgrading the computer to a later version creates the Windows.old folder that contains the older one as a protection measure in case something goes wrong and a system restore needs to be restored.
Όπως προαναφέραμε ο φάκελος Windows.old περιέχει όλα τα archives και τους φακέλους της παλιάς εγκατάστασης των Windows. Ο φάκελος δεν αποθηκεύεται για πολύ μεγάλο χρονικό διάστημα, και διαγράφεται αυτόματα από τα Windows.
Of course, you can use the Disk Cleanup tool to delete the folder, especially if you have limited space. If you are now trying to delete the folder manually from your File Explorer, you will notice that errors are reported that indicate that you are not entitled because the folder contains system files.
Remove the Windows.old folder manually
To do so you should run the following commands in the cmd.exe context
Open an cmd window with administrator privileges. To do so easily, tap the button that has the icon Window, and type cmd. Hold down the Shift + Ctrl keys and press Enter.
If the above is difficult for you, open the Windows menu and search for cmd.exe. Right click on the black icon and "Open as Administrator"
The three commands
takeown / F c: \ Windows.old \ * / R / A / DY
cacls c: \ Windows.old \ *. * / T / grant administrators: F
rmdir / S / Q c: \ Windows.old
Let's look carefully at the commands to understand what they are doing:
takeown / F c: \ Windows.old \ * / R / A / DY
Takeown can be used to make it team administrators, owner of a file or folder.
/F c:\Windows.old\* - This specifies the location and files to run the operation on.
/R - performs an iterative operation for all files located in the Windows.old folder
/A - gives ownership to the Administrators group.
/D Y - απαντάει την ερώτηση επιβεβαίωσης όταν ο τρέχων χρήστης δεν έχει την permission του "List Folder".
cacls c: \ Windows.old \ *. * / T / grant administrators: F
This command displays or modifies the DACL (discretion list accesss or discretionary access control list).
c:\Windows.old\*.* - The files you want the operation to run on.
/t - Changes the DACL of files in the selected folder and all subfolders.
/grant administrators:f - Grants full access rights to the administrators group (F stands for Full)
rmdir / S / Q c: \ Windows.old
The command deletes the folder
/S - This parameter allows deletion in the specified folder, all subfolders and their files.
/Q - runs the program in quiet mode without confirmation prompts.
c:\Windows.old - specifies the folder to delete.