Skip to content

Instantly share code, notes, and snippets.

@tanaytoshniwal
Created December 21, 2017 07:34
Show Gist options
  • Save tanaytoshniwal/1727b4869b0b3ab2eb5d1643161d7977 to your computer and use it in GitHub Desktop.
Save tanaytoshniwal/1727b4869b0b3ab2eb5d1643161d7977 to your computer and use it in GitHub Desktop.
unhide the hidden files and folders with a password that are hidden using attrib command
:: setting echo off
@echo off
:: setting password variable ad taking input
set /p "password="
:: checking the input with our password(unlock in this case)
if not "%password%" == "unlock" (exit)
:: unhiding files and folders using attrib command with attributes -h -r -s
else (T:&attrib -h -r -s File.txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment