Skip to content

Instantly share code, notes, and snippets.

@akaleeroy
Last active December 29, 2015 02:19
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 akaleeroy/7599242 to your computer and use it in GitHub Desktop.
Save akaleeroy/7599242 to your computer and use it in GitHub Desktop.
Pretty Decent Folder Hider - Batch file that hides a folder through shenanigans.
@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