回复 4# 77七
现在可以运行了,但是只运行了一次 :A, 然后就对话框结束了。不会继续处理jpg图片啊- @echo off
- Setlocal enabledelayedexpansion
- chcp 65001
- FOR /D %%a IN (*) DO (
- echo %%~fa
- cd /d %%~fa
- for /r %%i in (*.jpg) do (
- set pic=%%~ni.jpg
- "C:\Users\暴牙弟\Desktop\ImageMagick\convert.exe" -crop 2470x180+20+193 "%%i" "tmp.jpg"
- tesseract "tmp.jpg" "tmp" -l chi_sim
- find /i "银行" tmp.txt>nul&&echo goto :A||goto :B
-
- :A
- "C:\Users\暴牙弟\Desktop\ImageMagick\convert.exe" -crop 555x80+505+370 "!pic!" "tmp2.jpg"
- tesseract.exe "tmp2.jpg" "tmp2" -l chi_sim
- ping -n 2 127.0.0.1>nul
- set /p file=<"tmp2.txt"
- echo !file!
- pause
- mkdir !file!
- move !pic! !file!
- exit /b 0
- :B
- set /P file=<"tmp2.txt"
- move "%%i" !file!
- exit /b 0
- )
- )
- pause
复制代码 |