本帖最后由 WHY 于 2020-8-27 13:06 编辑
再贴两个:
gawk- @echo off
- for /f "tokens=1* delims=/" %%i in ('dir /b /a-d /s *%%* ^| gawk -F"\\" "{print $0\"/\"gensub(/([0-9]+(\.[0-9]+)?)%%/, \"百分之\\1\", \"g\", $NF)}"') do (
- echo;ren "%%i" "%%j"
- )
- pause
复制代码 GREN- gren -s -g "(\d+(?:\.\d+)?)%%" "百分之$1"
复制代码
|