Last active
December 29, 2015 02:19
-
-
Save akaleeroy/7599242 to your computer and use it in GitHub Desktop.
Pretty Decent Folder Hider - Batch file that hides a folder through shenanigans.
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
@echo off | |
:: The parent directory where the stash is | |
cd /d "E:\" | |
:: Check if the stash is exposed and lock it, unlock it if not | |
if not exist "*.{ed50fc29-b964-48a9-afb3-15ebb9b97f36}" ( goto Lock ) else goto Unlock | |
:Lock | |
ren "E:\Stash" Inconspicuous.{ed50fc29-b964-48a9-afb3-15ebb9b97f36} | |
cacls Inconspicuous.{ed50fc29-b964-48a9-afb3-15ebb9b97f36} /e /c /d %username% | |
goto :End | |
:Unlock | |
cacls Inconspicuous.{ed50fc29-b964-48a9-afb3-15ebb9b97f36} /e /c /g %username%:f | |
ren "E:\Inconspicuous.{ed50fc29-b964-48a9-afb3-15ebb9b97f36}" Stash | |
goto :EOF | |
:End | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment