改一下后缀名,.bat,在“你的密码”处改成自己的密码就可以啦。
cls @ECHO OFF title Folder Private if EXIST "HTG Locker" goto UNLOCK if NOT EXIST Private goto MDLOCKER :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 Locker" attrib +h +s "HTG Locker" echo Folder locked goto End :UNLOCK echo 输入密码来解锁文件夹 set/p "pass=>" if NOT %pass%== 你的密码 goto FAIL attrib -h -s "HTG Locker" ren "HTG Locker" Private echo Folder Unlocked successfully goto End :FAIL echo Invalid password goto end :MDLOCKER md Private echo Private created successfully goto End :End