|In the future, When adding comments, use the REM command. Two colons (::) is also an option if you wish.|
If you are wanting to use &, escape it with a caret (^).
ECHO Hello ^& Good bye.
However, I'm really sure that's what you are looking to accomplish.
When echoing %output% a few lines down, here's what you will get:
If this is what you wanted then ignore what I'm going to say next.
The variables will be replaced with what the user has set, but... I'm not understanding the purpose of this. Can I suggest you change it to:
set output=%appname% %filename% %folder% %message%
Can I put a question here?