Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@arspuja
Created February 19, 2021 10:37
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 arspuja/ee5fb22767f26e17f11f5eb4c7711fb4 to your computer and use it in GitHub Desktop.
Save arspuja/ee5fb22767f26e17f11f5eb4c7711fb4 to your computer and use it in GitHub Desktop.
Simple Lock and Set Password for Folder on Windows OS
cls
@ECHO OFF
title Simple Folder Locker by ARSPuja
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Anda yakin ingin mengunci dan menyembunyikan folder "LOCKER" ? (Y / N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==Ya goto LOCK
if %cho%==ya goto LOCK
if %cho%==y goto LOCK
if %cho%==tidak goto END
if %cho%==Tidak goto LOCK
if %cho%==n goto END
if %cho%==N goto LOCK
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Masukkan password untuk membuka folder "LOCKER" ( case sensitive )
set/p "pass=>"
if NOT %pass%==arspuja2021 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
@arspuja
Copy link
Author

arspuja commented Feb 19, 2021

HOW TO USE?

  1. Put the simple-locker.bat file into the same folder where the folder you are going to hide
  2. Run the simple-locker.bat file and you will see a folder called "Locker" appear.
  3. Enter all files or folders that you will hide into the folder "Locker"
  4. Then click the simple-locker.bat file again and enter Y
  5. Finish the folder is locked successfully
  6. How to open it you only need to click on the simple-locker.bat file and enter the password "arspuja2021" (without the quotes)

CARA MENGGUNAKAN?

  1. Taruh file simple-locker.bat ke folder yang sama di mana folder yang akan anda sembunyikan
  2. Jalankan file simple-locker.bat dan anda akan melihat muncul folder bernama "Locker"
  3. Masukkan semua file atau folder yang akan anda semunyikan ke dalam folder "Locker"
  4. Kemudian klik lagi file simple-locker.bat dan masukkan Y
  5. Selesai folder berhasil terkunci
  6. Cara membukanya anda hanya perlu klik file simple-locker.bat dan memasukkan password "arspuja2021" (tanpa tanda kutip)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment