level 1
转角遇见流量计
楼主
以下代码放在记事本里,保存为 lock.bat,可以隐藏文件夹。但是操作中,貌似到了ren这一步不行了,建立了新文件夹,但是隐藏的时候提示拒绝访问,找不到Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D},哪位高手能知道为什么啊?不胜感激。
cls
@ECHO OFF
title Folder 重要文件
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST 重要文件 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 重要文件 "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%== password goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" 重要文件
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md 重要文件
echo 重要文件 created successfully
goto End
:End
2016年01月05日 13点01分
1
cls
@ECHO OFF
title Folder 重要文件
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST 重要文件 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 重要文件 "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%== password goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" 重要文件
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md 重要文件
echo 重要文件 created successfully
goto End
:End
