bat隐藏文件夹
在windows中隐藏文件是可以隐藏,但是下面红色区域一旦选中,那也就显示出来了
现在有如下代码,可以实现个性化隐藏
=======================================================
代码区域
=======================================================
@ECHO OFF color 2 title Folder Private color 0d if EXIST "HTG Locker" goto UNLOCK if NOT EXIST Private goto MDLOCKER :CONFIRM echo =================================================== echo * * echo * 你确定要加密隐藏Private文件夹吗?(Y/N) * echo * Y:隐藏 * echo * N:不隐藏 * echo * * echo =================================================== 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%== 123 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
作者:奔跑的金鱼
声明:书写博客不易,转载请注明出处,请支持原创,侵权将追究法律责任
个性签名:人的一切的痛苦,本质上都是对自己无能的愤怒
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!