-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocker.bat
More file actions
47 lines (38 loc) · 849 Bytes
/
Locker.bat
File metadata and controls
47 lines (38 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
:: Folder Locker Script
:: This script creates a folder named "Locker" and allows the user to lock or unlock it with a password.
:: The folder is hidden when locked and visible when unlocked.
cls
@ECHO OFF
title Folder Locker
:: Check if folder exists
if NOT EXIST "Locker" (
goto CREATE
)
:: Check if the folder is hidden (locked)
attrib Locker | find "H" > nul
if %ERRORLEVEL%==0 (
goto UNLOCK
) else (
goto LOCK
)
: CREATE
md Locker
echo Locker folder created.
goto End
: LOCK
attrib +h +s Locker
echo Folder Locked.
goto End
: UNLOCK
echo Enter Password to Unlock Folder:
set /p "pass=>"
if NOT %pass%==YOUR_PASSWORD_HERE goto FAIL
attrib -h -s Locker
echo Folder Unlocked.
goto End
: FAIL
echo Wrong password!
goto End
:End
pause
:: Code contributed by Hacker Store Official