Skip to content

Instantly share code, notes, and snippets.

@PProvost
Created February 2, 2009 01:46
Show Gist options
  • Save PProvost/56734 to your computer and use it in GitHub Desktop.
Save PProvost/56734 to your computer and use it in GitHub Desktop.
Use this script to "take control of" files that you can't access.
:: Use this script to "take control of" files that you can't access. Particularly
:: useful for external NTFS volumes that were created on another computer or by
:: another user
takeown /f %1 /r /d y
icacls %1 /grant administrators:F /t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment