返回列表 发帖
本帖最后由 lanfogz 于 2019-1-30 17:51 编辑

我的想法:先过滤乱码,再进行处理。

有个小工具(https://pan.baidu.com/s/1jIrZ5pB9wYyaFhx70GfScw),执行“smooth 文件名”
可以把结果粘贴上来,看看效果


理想的效果是:
@echo off &setlocal enabledelayedexpansion
for /f %%i in ('smooth %1 ^|findstr model_name') do (
set c=%%i
rename %1 !c:10!
goto:break
)
:breakCOPY

TOP

@echo off &setlocal enabledelayedexpansion
for /r %%a in (*.txt) do (
  call:r %%a
)
goto:eof
:r
  for /f %%i in ('smooth %1 ^|findstr model_name') do (
    set c=%%i
    set k=!c:~0,10!
    set v=!c:~10!
    if "!k!" equ "model_name" (
      if "!v!" neq "" (
        rename %1 !v!
if errorlevel 0 (echo %1 to !v!) else (echo %1 to !v! ---- fail)
goto:eof
      )
    )
  echo %1 ---- not found
  )COPY
https://pan.baidu.com/s/1o23mHiKZBrfNq_P73SVG9A
重在参与!

TOP

返回列表