本帖最后由 回家路上 于 2015-9-16 21:55 编辑
回复 5# shimuren
这么半天了,就是不说你需求,
让别人读代码去揣测需求总是不好。- @echo off&setlocal enabledelayedexpansion
- for /r %%a in (*) do (
- set fn=%%~na
- set tmp=!fn:,=,!
- if "!tmp!" neq "%%~na" (
- for %%i in (!tmp!) do set suf=%%i
- for /f "delims=0123456789" %%i in ("!suf!") do set isNaN=1
- if not defined isNaN for %%i in (!suf!) do ren "%%~nxa" "!fn:,%%i=!%%~xa"
- set isNaN=
- )
- )
- pause & exit /b
复制代码
|