ken_nogi/PythonProj/ScanOCR/OCR仕分け実行.bat
Kenichiro NOGI a288d56aef feat: 起動バッチOCR仕分け実行.batを追加
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-02 10:16:34 +09:00

38 lines
1007 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
cd /d "%~dp0"
if not exist "config.txt" (
echo config.txt が見つかりません。配布パッケージが不完全です。
pause
exit /b 1
)
set "SCRIPT_DIR="
for /f "usebackq tokens=1,2 delims==" %%A in ("config.txt") do (
if "%%A"=="スクリプトフォルダ" set "SCRIPT_DIR=%%B"
)
if "%SCRIPT_DIR%"=="" (
echo config.txt に スクリプトフォルダ の設定が見つかりません。
pause
exit /b 1
)
set "PYTHON_EXE=%~dp0%SCRIPT_DIR%\python\python.exe"
set "MAIN_PY=%~dp0%SCRIPT_DIR%\extract_and_rename.py"
if not exist "%PYTHON_EXE%" (
echo 配布パッケージが不完全ですpythonフォルダが見つかりません。管理者に確認してください。
pause
exit /b 1
)
if not exist "%MAIN_PY%" (
echo 配布パッケージが不完全ですextract_and_rename.pyが見つかりません。管理者に確認してください。
pause
exit /b 1
)
"%PYTHON_EXE%" "%MAIN_PY%"