This is the problem:
set /a var1= %todo% & echo %linea%>>%exename%
set todo= %var1%'
What I want is that %var1%
contain all the information above, and then pass it to %todo%
This is mostly that and the &
is detected as if it were more than 1 command on a line.