Skip to content

Instantly share code, notes, and snippets.

@surajitbasak109
Last active August 15, 2018 17:03
Show Gist options
  • Save surajitbasak109/b8bda9b7eebec5781f13bc06417fb945 to your computer and use it in GitHub Desktop.
Save surajitbasak109/b8bda9b7eebec5781f13bc06417fb945 to your computer and use it in GitHub Desktop.
cls
@ECHO OFF
title Folder Private
if EXIST "MY_LOCKER_FOLDER" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "cho=(more than)"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Private "MY_LOCKER_FOLDER"
attrib +h +s "MY_LOCKER_FOLDER"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=Enter Your PassWord:"
if NOT %pass% == skyline@123 goto FAIL
attrib -h -s "MY_LOCKER_FOLDER"
ren "MY_LOCKER_FOLDER" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment