How to Delete $Windows.~WS folder in Windows 10  

    How to Delete $Windows.~WS folder in Windows 10

    How to Delete $Windows.~WS folder in Windows 10

    What is $Windows.~WS folder and how to delete $Windows.~WS folder in Windows 10
    Published by Category: Performance & Maintenance
    20 Dec 2020
    Designer Media Ltd
     

    How to Delete $Windows.~WS folder in Windows 10


    The $Windows.~WS folder is a hidden folder that is created in the root directory of the Windows "C:" drive during the upgrade process to Windows 10. The WS in the $Windows.~WS folder name stands for Windows Setup.

    The $Windows.~WS folder contains essential files of the previous system version used to allow you to go back to the previous version of Windows.

    This tutorial will show you how to delete the $Windows.~WS folder in the root directory of the Windows 10 drive to free up hard drive space if needed.


    You must be signed in as an administrator to delete the $Windows.~WS folder.


    If you delete the Windows.old, $Windows.~BT, and/or $Windows.~WS folder, you will no longer be able to go back to the previous version of Windows.


    If you delete the $Windows.~WS folder, it is recommended to also delete the Windows.old and $Windows.~BT folders to free up additional hard drive space.


    EXAMPLE: $Windows.~WS folder
    How to Delete $Windows.~WS folder in Windows 10-windows.-ws_folder.png



    Here's How:

    1 Open an elevated command prompt.

    2 Copy and paste the commands below into the elevated command prompt one at a time, and press Enter after each command. (see screenshot below)

    takeown /F "C:\$Windows.~WS\*" /A /R /D Y

    icacls "C:\$Windows.~WS\*.*" /grant *S-1-5-32-544:F /T /C /Q

    RD /S /Q "C:\$Windows.~WS"


    3 When finished, you can close the elevated command prompt if you like.

    How to Delete $Windows.~WS folder in Windows 10-delete_-windows.-ws_folder_command.png


    That's it,
    Shawn Brink



  1. Paul Black's Avatar
    Posts : 12,559
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #1

    Hello @Brink,

    I had written a Batch script a while ago for this. I thought that I had posted it. Anyway, here it is for you to check and to possibly include it in the Tutorial if you so wish . . .

    Code:
    @echo off
    :: #########################################################################################################
    :: # Title:      Delete Windows.old, $WINDOWS.~BT, or $WINDOWS.~WS Folders                                 #
    :: # Created By: Paul Black at TenForums.com/members/paul-black.html                                       #
    :: # Created In: December 2020                                                                             #
    :: # Tutorial  : https://www.tenforums.com/tutorials/170915-how-delete-windows-ws-folder-windows-10-a.html #
    :: #########################################################################################################
    title Delete System Folders - Written by Paul Black.
    mode con: cols=80 lines=26 & color 17
    set "params=%*"
    cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs") && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && Exit /b)
    %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || ( echo. & echo  ERROR: This Batch file MUST be run in an ELEVATED cmd prompt [ Administrator ] & echo. & echo         Right-click the Batch file and click ^<Run as administrator^>. & echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit )
    
    set "Win_Old=%SystemDrive%\Windows.old"
    set "Win_BT=%SystemDrive%\$WINDOWS.~BT"
    set "Win_WS=%SystemDrive%\$WINDOWS.~WS"
    
    :Options
    
    echo. & echo  ==============================================================================
            echo  Delete Windows.old, $WINDOWS.~BT, or $WINDOWS.~WS Folders [ Windows 10 ONLY ].
            echo  ==============================================================================
    echo. & echo  Options:
    echo. & echo  [0] EXIT this Program.
    echo. & echo  [1] Delete the Windows.old  Folder.
            echo  [2] Delete the $WINDOWS.~BT Folder.
            echo  [3] Delete the $WINDOWS.~WS Folder.
    echo. & echo  ==============================================================================
    echo.
    
    CHOICE /N /C 0123 /M ">Enter an Option:"
    if %errorlevel%==4 goto Win_WS
    if %errorlevel%==3 goto Win_BT
    if %errorlevel%==2 goto Win_Old
    if %errorlevel%==1 goto Exit
    goto :Options
    
    :Win_Old
    
    if not exist "%SystemDrive%\%Win_Old%" (
      echo. & echo  The folder does NOT exist.
      echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul
      cls & goto :Options
    ) else (
      echo. & echo  Processing . . .
      takeown /F "C:\Windows.old" /A /R /D Y
      icacls "C:\Windows.old" /grant *S-1-5-32-544:F /T /C /Q
      rmdir /S /Q "C:\Windows.old" >nul 2>&1
      echo. & echo  Processing COMPLETE.
      echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul
      cls & goto :Options
    )
    
    :Win_BT
    
    if not exist "%SystemDrive%\$WINDOWS.~BT" (
      echo. & echo  The folder does NOT exist.
      echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul
      cls & goto :Options
    ) else (
      echo. & echo  Processing . . .
      takeown /F C:\$Windows.~BT\* /A /R /D Y
      icacls C:\$Windows.~BT\*.* /T /grant administrators:F 
      rmdir /S /Q C:\$Windows.~BT\ >nul 2>&1
      echo. & echo  Processing COMPLETE.
      echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul
      cls & goto :Options
    )
    
    :Win_WS
    
    if not exist "%SystemDrive%\$WINDOWS.~WS" (
      echo. & echo  The folder does NOT exist.
      echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul
      cls & goto :Options
    ) else (
      echo. & echo  Processing . . .
      takeown /F C:\$Windows.~WS\* /A /R /D Y
      icacls C:\$Windows.~WS\*.* /T /grant administrators:F 
      rmdir /S /Q C:\$Windows.~WS\ >nul 2>&1
      echo. & echo  Processing COMPLETE.
      echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul
      cls & goto :Options
    )
    :Exit
    Thanks.
      My Computer

  2. Brink's Avatar
    Posts : 57,053
    64-bit Windows 10 Pro for Workstations build 21382
    Thread Starter
       #2

    Thank you @Paul Black.
      My Computers


  3. Posts : 363
    Windows 10
       #3

    Is this really necessary? In this computer the sizes of -WS and -BT are 263 KB and 19.8 KB, not worth deleting.
      My Computer

  4. Brink's Avatar
    Posts : 57,053
    64-bit Windows 10 Pro for Workstations build 21382
    Thread Starter
       #4

    Anibor said:
    Is this really necessary? In this computer the sizes of -WS and -BT are 263 KB and 19.8 KB, not worth deleting.
    Not when it's only that size, but the option is there if really wanted.
      My Computers


 

Tutorial Categories

How to Delete $Windows.~WS folder in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:43.
Find Us




Windows 10 Forums