Created
December 7, 2017 22:39
-
-
Save yonixw/f7c7dc42ebbe25d082744154596bad8c to your computer and use it in GitHub Desktop.
Script for making a folder "Backup Ready" - Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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