Config folder has "Ghost" files

Discussion in 'Windows 8' started by M0rriss0n, Aug 30, 2013.

  1. M0rriss0n

    M0rriss0n MDL Senior Member

    Sep 17, 2011
    318
    96
    10
    #1 M0rriss0n, Aug 30, 2013
    Last edited: Aug 30, 2013
    Using Treesize to monitor big folders in Windows and guess what
    C:\windows\system32\config was 4,2 GB
    It contained thousands of Drivers{guid} files
    In explorer you don't see them, even when hidden files are checked to show

    Googled around and found a powershell option cause elevated prompt could not find the files
    Just want to share with those who have the same issue with their config folder

    execute in powershell

    $SysConfigFiles = (Get-ChildItem -Path "C:\windows\System32\config" -Filter * -Hidden)
    $SysConfigFiles | Measure-Object
    $FilesToDelete = $SysConfigFiles | Where-Object {$_.Name -like "DRIVERS*"}
    $FilesToDelete | Remove-Item -Force

    This did the trick for me, and my config folder is 426 MB again
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...