CODE: [Copy to clipboard]@echo off if [%1]==[] call %0 1 2 3 4 5 6 7 8 9 :loop if [%2]==[] goto end echo %1>>2.txt shift goto loop :end