1. 程式人生 > >Windows文件夾加密(宅男專用。。。)

Windows文件夾加密(宅男專用。。。)

reat 設置密碼 eat create val == 解鎖 pass not

加密windows系統的文件夾內容,加密後的文件夾內容只有輸入密碼後,才能看到。先上代碼:

cls
@ECHO OFF
title Folder Private
if EXIST "Locker" 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 "Locker"
attrib +h +s "Locker"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== 你的密碼 goto FAIL
attrib -h -s "Locker"
ren "Locker" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Private

echo Private created successfully
goto End
:End

將這段代碼復制到文本編輯器,記事本或者Editplus文本編輯器,設置密碼,然後保存後綴為.bat即可。

技術分享

技術分享

技術分享

技術分享

技術分享

文件夾的加鎖和解鎖,重復上面的步驟即可。

Windows文件夾加密(宅男專用。。。)