How to remove New line character from batch variable

a 夏天 提交于 2019-12-24 11:39:08

问题


Good Day All! I have a batch script, and when I echo a variable like this

echo %variable1%

I get out put like this

TestLine1
TestLine2
TestLine3
TestLine4

My goal would be to modify this variable to remove all the newline characters so the output would look more like

TestLine1TestLine2TestLine3TestLine4

Is there a simple way to do this without creating files? Thank you for your assistance.

来源:https://stackoverflow.com/questions/47335326/how-to-remove-new-line-character-from-batch-variable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!