大佬我系统是win11,用过这几个脚本
重命名ICO为文件夹名称bat
@echo off
for /d %%i in (*) do (
ren %%i\*.ico %%i.ico
)
设置文件夹图标为文件夹同名ICO文件bat
@ echo off
for /d %%i in (*) do (
if exist "%%i\%%i.ico" (
>nul attrib -s -h "%%i\desktop.ini"
>"%%i\desktop.ini" (
echo [.ShellClassInfo]
echo IconFile=%%i.ico
echo IconIndex=0
)
attrib +s +h "%%i\desktop.ini"
attrib +r "%%i"
)
)
pause
替换文件夹名称词汇bat
@echo off & setlocal enabledelayedexpansion
title BAT-GO团队奉献 http://zhidao.baidu.com/team/view/BAT-GO
set a=
set b=
set c=
set xz=
cls&echo 【1】替换XX 【2】替换XXX
echo.
set /p a=你想替换什么字符,请选择1或2:
if "!a!"=="1" set b=XX
if "!a!"=="2" set b=XXX
cls&set /p c=你想将!b!替换城什么字符:
for /f "delims=" %%a in ('dir /s /b /ad "*!b!*"') do (
set xz=%%a
echo 正在替换!xz!
move /y "!xz!" "!xz:%b%=%c%!" >nul 2>nul
)
echo OK!
pause作者: 小小菜鸟 时间: 2022-3-26 19:17