如何用批处理修改文件夹选项的属性,例如隐藏、显示扩展名、显示当前文件夹路径等?(可加分)

文件夹选项的属性,不止这么少吧!
2024-12-17 13:39:45
推荐回答(1个)
回答1:

@echo off
echo.1.设置显示扩展名\显示当前文件夹路径;2.设置不显示扩展名\不显示当前文件夹路径
set /p select=
if "%select%"=="1" (
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD

/d 0 /f >nul
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState /v FullPathAddress /t

REG_DWORD /d 1 /f >nul
)
if "%select%"=="2" (
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD

/d 1 /f >nul
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState /v FullPathAddress /t

REG_DWORD /d 0 /f >nul
)
cls
echo.设置完成,刷新后生效!
pause>Nul

写点东西费脑子啊,加点分吧,呵.