Skip to content

Instantly share code, notes, and snippets.

@akaleeroy akaleeroy/toggle.bat
Last active Dec 29, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.