Skip to content

Instantly share code, notes, and snippets.

@yonixw
Created December 7, 2017 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yonixw/f7c7dc42ebbe25d082744154596bad8c to your computer and use it in GitHub Desktop.
Save yonixw/f7c7dc42ebbe25d082744154596bad8c to your computer and use it in GitHub Desktop.
Script for making a folder "Backup Ready" - Windows
set /p path=Enter folder path (C:\Path\to\Folder or G:)
REM Make me owner:
takeown /D Y /f "%path%" /r
REM Make sure i have permission and remove all deny
icacls "%path%\*.*" /reset /T
REM Remove system (-S) and hiddden (-H) from all files
attrib /S /D /L -H -S "%path%\*.*"
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment