编写如下批处理:
新建文本文件,将以下内容另存为.BAT的文件,双击打开后即可!
注:
执行相关选项后,需刷新一下才可以看到效果,另外,批处理运行时,360安全卫士等软件可能会弹出提示,请点击确定!
@echo offtitle 文件属性:startcolor 0aclsecho ------------------echo --------| 1:显示所有文件 |--------echo --------| 2:不显示隐藏文件 |--------echo --------| 3:显示扩展名 |--------echo --------| 4:不显示扩展名 |--------echo --------| H.实现原理 |--------echo --------| Q:退出 |--------echo ------------------echo 设置完成后请右键-刷新echo --------------------echo 注:如果360安全卫士等软件弹出安全提示,请点击确定即可!echo.&echo.set /p input="请按键选择:"if /i "%input%"=="1" (goto 1)if /i "%input%"=="2" (goto 2)if /i "%input%"=="3" (goto 3)if /i "%input%"=="4" (goto 4)if /i "%input%"=="q" (goto exit)if /i "%input%"=="H" (goto help) else (goto start):1reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 1 /freg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 1 /fping -n 2 127.0>nulgoto start:2reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 00000000 /freg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 00000000 /fping -n 2 127.0>nulgoto start:3reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 0 /fping -n 2 127.0>nulgoto start:4reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000001 /fping -n 2 127.0>nulgoto start:exitexit:helpcolor 0amode con cols=125 lines=16echo ------------------------------------------------------------echo 显示所有文件:echo reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 1 /fecho reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 1 /fecho 不显示所有文件:echo reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 00000000 /fecho reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 00000000 /fecho 显示文件扩展名:echo reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 0 /fecho 不显示文件扩展名:echo reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000001 /fecho -----------------------------------------------------------echo.echo 按任意键回到选项页pause>nulgoto start