Padding zeros

@ECHO OFF
 
SET i=1
FOR /L %%V IN (1,1,1003) DO (
CALL :Increment
)
 
ECHO "Done showing zero padding."
 
GOTO :EOF
 
:Increment
  REM Padding zeros
  SET filename=%i%
  if %i% lss 1000 set filename=0%i%
  if %i% lss 100 set filename=00%i%
  if %i% lss 10 set filename=000%i%
 
  ECHO %filename%.txt
 
  SET /a i+=1
  GOTO :EOF
Output will look like:
....
0889.txt
0890.txt
0891.txt
0892.txt
0893.txt
0894.txt
0895.txt
....