How to use batch processing to splice multiple lines of text into use; a connected line
This article mainly introduces how to use batch processing to splice multiple lines of text into use; a connected line has certain reference value, interested friends can refer to it, I hope you have a lot of harvest after reading this article, let Xiaobian take you to understand.
The code is as follows:
@echo off :: concatenate multiple lines of text; concatenate one line:: object file.txt exit
Another way:
set tmpstr= setlocal enabledelayedexpansion for /f "tokens=*" %%i in (1.txt) do set tmpstr=! tmpstr! %%i echo %tmpstr% pause exit
There is also a way to disable variable delay, which is compatible with all special characters except English double quotes:
@echo off :: code by jm 2006-12-14 for /f "delims=" %%i in (1.txt) do call set "var=%%var%%i" echo "%var%" pause Thank you for reading this article carefully, I hope Xiaobian share "How to use batch processing to splice multi-line text into use; connected line" This article is helpful to everyone, but also hope that everyone supports more, pay attention to industry information channels, more relevant knowledge waiting for you to learn!