Skip to content

Instantly share code, notes, and snippets.

@AndiSHFR
Created April 5, 2016 19:20
Show Gist options
  • Save AndiSHFR/b5c7b4f56a3602981f2795a0e874e869 to your computer and use it in GitHub Desktop.
Save AndiSHFR/b5c7b4f56a3602981f2795a0e874e869 to your computer and use it in GitHub Desktop.
Remove $WINDOWS.~BT
// go inside that folder:
cd /d "C:\$Windows.~BT"
// take over ownership
takeown /f *.* /R /D Y
// (go for coffee, takes a minute)
// grant full rights to everyone
icacls *.* /grant Everyone:(OI)(CI)F /T
// (coffee?)
// and all other subfolders, just be careful with use of *, naturally.
rmdir Sources /s /q
// actually, I got a few errors with rmdir. Things went smoother
// with this Unix-like ´rm´ executable in your path,
// coming from unxutils.sf.net
rm -r -f *
// after all has been wiped, also remove the parent dir
C:\$Windows.~BT>cd ..
C:\>rmdir "$Windows.~BT"
// checking...
C:\>dir /A:DHS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment