我在此link使用了一个教程来保护我的一个重要文件, CODE是:
cls
@ECHO OFF
title coolhacking-tricks.blogspot.com
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto
UNLOCK
if NOT EXIST MyFolder goto MDMyFolder
:CONFIRM
echo Are you sure to lock this 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 MyFolder "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 Your Secure Folder
set/p "pass=>"
if NOT %pass%== coolhacks goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDMyFolder
md MyFolder
echo MyFolder created successfully
goto End
:End
但是当我运行lock.bat时,我没有得到要求输入密码的屏幕。而是出现一个屏幕并指出:“系统找不到指定的批次标签”,突然屏幕消失而不等待几分之一秒。上传者无法解决我的问题。
答案 0 :(得分:3)
在驱动器的根文件夹中运行此命令(假设您的脚本使用与该页面上的脚本相同的GUID):
dir /b /s /a:s *.{21EC2020-3AEA-1069-A2DD-08002B30309D}
如果您可以将位置缩小到特定的父文件夹,则需要更少的时间。
使用以下两个命令取消隐藏文件夹:
attrib -s -h "C:\path\to\Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "C:\path\to\Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" newname
下次还要避免那种蹩脚的“安全工具”。它首先没有密码保护任何东西。它只是重命名文件夹,并设置hidden
和system
属性。
答案 1 :(得分:1)
也许使用这个(但重新:
cls
@ECHO OFF
title Folder Private
if EXIST "HTG 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 "HTG Locker"
attrib +h +s "HTG Locker"
echo Folder locked
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== beef 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