@echo off REM ========================================== REM CME OI Scraper - Automatic Daily Runner REM ========================================== REM Change to script directory cd /d C:\Users\YourUsername\Gitea\MeanRevisionEA\oi_scraper echo ========================================== echo CME OI Scraper - Daily Update echo ========================================== echo Started at: %date% %time% echo ========================================== >> scraper.log REM Run Python scraper python main.py >> scraper.log 2>&1 REM Check if scraper succeeded if %ERRORLEVEL% EQU 0 ( echo [%date% %time%] Scraper completed successfully >> scraper.log REM Check if CSV file was created if exist oi_data.csv ( echo [%date% %time%] CSV file created successfully >> scraper.log REM Copy to MetaTrader 5 Files directory REM Update this path to your actual MT5 directory copy oi_data.csv "C:\Users\YourUsername\AppData\Roaming\MetaQuotes\Terminal\[Your_Terminal_ID]\MQL5\Files\oi_data.csv" if %ERRORLEVEL% EQU 0 ( echo [%date% %time%] CSV copied to MT5 Files directory >> scraper.log ) else ( echo [%date% %time%] ERROR: Failed to copy CSV to MT5 directory >> scraper.log ) ) else ( echo [%date% %time%] WARNING: oi_data.csv not found >> scraper.log ) ) else ( echo [%date% %time%] ERROR: Scraper failed with error code %ERRORLEVEL% >> scraper.log ) echo ========================================== echo Completed at: %date% %time% echo ========================================== REM Keep window open for 5 seconds to see any errors timeout /t 5