I suspect that you have called the batch file convert and it is calling itself.
Pick another name like convertgif.bat and your loop also needs to change so that some files aren't processed more than once.
The double quotes are to handle spaces etc in filenames.
Pick another name like convertgif.bat and your loop also needs to change so that some files aren't processed more than once.
The double quotes are to handle spaces etc in filenames.
Code:
@echo off
for /f "delims=" %%x in ('dir *.gif /b /a-d ') do (
convert -page +0+0 "background.png" -page +0+0 "%%x" -flatten "%%x"
)
pause