This file contains hidden or 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
| @echo off | |
| set folders=node_modules | |
| echo This will delete all [%folders%] folders recursively and cannot be undone. | |
| choice /t 10 /d n /c yn /m "Press Y to continue, N to stop" | |
| if %errorLevel% neq 1 goto :EOF | |
| for /d /r . %%D in (%folders%) do if exist "%%~fD\" (echo %%D && rd "%%~fD" /s /q) |
This file contains hidden or 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
| # Source: https://stackoverflow.com/a/43317244 | |
| $path = ".\aws-ec2-key.pem" | |
| # Reset to remove explict permissions | |
| icacls.exe $path /reset | |
| # Give current user explicit read-permission | |
| icacls.exe $path /GRANT:R "$($env:USERNAME):(R)" | |
| # Disable inheritance and remove inherited permissions | |
| icacls.exe $path /inheritance:r |