@echo off chcp 65001 >nul cd /d "D:\wxpic" echo Starting upload service... start "" /min python -m uploadserver 8080 --directory "D:\wxpic" :: 等待3秒让进程启动 timeout /t 3 /nobreak >nul :: 只检查python.exe是否存在 tasklist | find /i "python.exe" >nul if %errorlevel% equ 0 ( echo [OK] Upload service started on port 8080! ) else ( echo [ERROR] Failed to start upload service! pause )