:: Use ^ before the character in order to make cmd ignore it as a function @Echo off call :data2 >file1.txt exit /b :data2 ECHO OFF ECHO ^<^?xml version="1.0" encoding="UTF-8"^?^>