@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in ('dir /s/b *.*') do (
set "foo=%%~nxi"
set foo=!foo: =!
set foo=!foo: =!
ren "%%~fi" "!foo!"
)
exit
-------------------------------------------------
@Echo Off&SetLocal ENABLEDELAYEDEXPANSION
FOR %%a in (*) do (
set "name=%%a"
set "name=!name:(=!"
set "name=!name:)=!"
ren "%%a" "!name!"
)
转自:https://jingyan.baidu.com/article/20095761fb5090cb0721b4ac.html
转自:https://blog.csdn.net/fengda2870/article/details/68066324