@ echo offSETLOCAL EnableDelayedExpansionremfor /L %%N in (1,1,1000) DO (set str=0000%%Necho.copy abx.txt \!str:~-4,4!-AAA\)