Skip to content

Instantly share code, notes, and snippets.

@asears
Created December 1, 2018 09:35
Show Gist options
  • Select an option

  • Save asears/2c74ad58887bd0b9c5b9cce0c295563a to your computer and use it in GitHub Desktop.

Select an option

Save asears/2c74ad58887bd0b9c5b9cce0c295563a to your computer and use it in GitHub Desktop.
Take Ownership and then delete files from internal/external drives
REM takes ownership then deletes files
REM use this for external drives from another machine
set pathname="e:\cygwin64"
takeown /f %pathname% /r
icacls %pathname% /reset /T
del /s /q %pathname%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment