CODE: [Copy to clipboard]@echo off & Setlocal EnableDelayedExpansion for /l %%i in (1,1,250) do ( set num=00%%i <nul set/p=!num:~-3!,>>a.txt )