setlocal enabledelayedexpansionset dm=500019for /l %%i in (300,1,310) do ( set /a dm = !dm!+1 for /f %%j in (a300.txt) do ( set var=%%j call set "var=%%var:500019=!dm!%%" echo !var!>>a%%i.txt ))
把%dm%改为!dm!