cls
@ECHO OFF
title Folder Private
if EXIST "HTG Lock" goto UNLOCK
if NOT EXIST Private goto MDLock
:CONFIRM
echo 你确定要加密隐藏Private文件夹吗?(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 "HTG Lock"
attrib +h +s "HTG Lock"
echo Folder locked
goto End
:UNLOCK
echo 输入密码来解锁文件夹
set/p "pass=>"
if NOT %pass%== 在此设置密码 goto FAIL
attrib -h -s "HTG Lock"
ren "HTG Lock" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLock
md Private
echo Private created successfully
goto End
:End
“在此设置密码”处可替换成你想要设置的密码,注意不要删掉空格,完成后记得保存
时间: 2024-10-08 15:27:22