也就是說不用密碼,或是打開 .bat 就知道密碼了
唯一好處就是勾選顯示解隱檔也看不到
所以我就乾脆改成不用密碼的,反正也沒人知道要點哪個才會出現隱藏資料夾OuO
<<注意>>
看到有先評論說不穩定還是啥的,不建議使用在無備份的重要資料上
還有,有密碼也不保證安全
首先新增文字文件,貼上下面一大串
cls @ECHO OFF title Folder Locker if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK if NOT EXIST Locker goto MDLOCKER :CONFIRM echo Are you sure u 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 Locker "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" echo Folder locked goto End :UNLOCK :: echo Enter password to Unlock folder :: set/p "pass=>" :: if NOT %pass%==Your-Password-Here goto FAIL if NOT 1==1 goto FAIL attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker echo Folder Unlocked successfully goto End :FAIL echo Invalid password goto end :MDLOCKER md Locker echo Locker created successfully goto End :End
下面這三行是使用密碼版本,想用密碼可將前面的 ":: " 砍掉
記得 "Your-Password-Here" 改成要用的密碼
密碼忘記其實打開 .bat 就可以看到,還可以編輯....
:: echo Enter password to Unlock folder :: set/p "pass=>" :: if NOT %pass%==Your-Password-Here goto FAIL
另存成 FolderLocker.bat
點兩下 FolderLocker.bat 後會先產生 Locker 資料夾
把要放的東西放進此資料夾
再點兩下 FolderLocker.bat 之後輸入 y 會把 Locker 資料夾隱藏起來
再點兩下 FolderLocker.bat 則復原
不保證安全,還是可以從其他地方進去,就算是有密碼版本也不需要密碼
參考資料:
How To Password Protect a Folder in Windows 10
lock folder without any software
How to “comment-out” or add comment in a batch/cmd?
沒有留言:
張貼留言