-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunlock.bat
More file actions
46 lines (41 loc) · 1020 Bytes
/
unlock.bat
File metadata and controls
46 lines (41 loc) · 1020 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
@ECHO OFF
color 0f
title Folder Lock
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "cho=>"
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 "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s +r "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
pause
goto End
:UNLOCK
title Folder Locked
echo Folder state: Locked
echo You need a password to unlock folder
set/p "pass=>"
if NOT %pass%== password goto FAIL
attrib -h -s -r "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
pause
goto End
:FAIL
echo Invalid password
pause
goto end
:MDLOCKER
md Privte
echo Folder created successfully
pause
goto End
:End