|maybe (after the gif copy):|
for %%a in (c:\emailsignature\signature*.htm) do copy %%a + sig.htm %%a
put sig.htm into the same directory where the .gif file originates from.
sig.htm content is just your:
depending on the situation, you might need to test to see if
the sig has already been appended:
find /i %%a "environment.gif" || copy %%a + sig.htm ...
ps: this could also work, but I prefer the aforementioned method:
(fixing the code you were using, not tested):
for /f "tokens=*" %%a in ('dir "c:\emailsignature\*.htm" /b') do (
>> %%a echo ^