Last active
August 29, 2015 14:24
-
-
Save muthuishere/17ffd4d4fed0d5b5756b to your computer and use it in GitHub Desktop.
Lock unlock folders
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
| REM ===========unlk============== | |
| @echo off | |
| IF NOT EXIST c:\opt\ew GOTO EXIT | |
| attrib -h "opt\ew" | |
| IF NOT EXIST "c:\opt\New Folder" GOTO PROCEED | |
| attrib -h "opt\New Folder" | |
| rmdir /Q "c:\opt\New Folder" | |
| :PROCEED | |
| ren c:\opt\ew "New Folder" | |
| attrib +h "opt\New Folder" | |
| :EXIT | |
| REM ==============lk ================ | |
| @echo off | |
| IF EXIST c:\opt\ew GOTO EXIT | |
| IF NOT EXIST "c:\opt\New Folder" GOTO EXIT | |
| attrib -h "opt\New Folder" | |
| ren "c:\opt\New Folder" ew | |
| attrib +h "opt\ew" | |
| mkdir "opt\New Folder" | |
| :EXIT | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment