playinthesky 当前离线
三级士官
@echo off&setlocal enabledelayedexpansion for /f %%x in (‘dir/b/a-d/s”*.txt"’) do ( set "temp=%%x" set temp=!temp: =[! ren "%%x" "!temp!" )复制代码
评分人数
batman 当前离线
考官
荣誉版主
@echo off&setlocal enabledelayedexpansion for /r %%a in (*.txt) do ( set "str=%%~nxa" ren "%%a" "!str: ={!" ) 复制代码
TOP
tmplinshi 当前离线
版主
@echo off for /f "delims=" %%i in (' dir /a:-d /b /s "* *.txt" ') do ( set file=%%i set fname=%%~nxi setlocal enabledelayedexpansion ren "!file!" "!fname: =[!" endlocal )复制代码