BAT脚本修改指定文件夹的图标,文件夹图标不变
@ECHO OFF
SET "MUSIC_DIR=D:\新建文件夹"
CALL :DIRICON "%MUSIC_DIR%"
PAUSE
GOTO :EOF
::结束
:DIRICON DIR
ATTRIB -H -S -R "%~1\DESKTOP.INI"
(
ECHO,[.ShellClassInfo]
ECHO,IconFile=%%SystemRoot%%\system32\SHELL32.dll
ECHO,IconIndex=-237%_这是音乐文件夹图标_%
)>"%~1\DESKTOP.INI"
ATTRIB +H +S "%~1\DESKTOP.INI"
::ATTRIB -R %1
ATTRIB +R %1