Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 如何使用批处理文件删除换行符_Batch File_Batch Processing - Fatal编程技术网

Batch file 如何使用批处理文件删除换行符

Batch file 如何使用批处理文件删除换行符,batch-file,batch-processing,Batch File,Batch Processing,我想使用批处理文件删除文本文件中的换行符。 有可能吗。 请提供一些帮助如果要从文本文件中删除空行,请在批处理文件中尝试以下操作: for /f "delims= tokens=*" %%x in (inputfile.txt) do echo %%x >> outputfile.txt 您可能还想用%1和%2替换inputfile.txt和outputfile.txt,以用于批处理文件名下的任何文件帮个忙,不要尝试在dos批处理中做有用的工作,这会让您哭泣。相反,试试翻转:它很旧,

我想使用批处理文件删除文本文件中的换行符。 有可能吗。
请提供一些帮助

如果要从文本文件中删除空行,请在批处理文件中尝试以下操作:

for /f "delims= tokens=*" %%x in (inputfile.txt) do echo %%x >> outputfile.txt

您可能还想用%1%2替换inputfile.txtoutputfile.txt,以用于批处理文件名下的任何文件

帮个忙,不要尝试在dos批处理中做有用的工作,这会让您哭泣。相反,试试翻转:它很旧,可以工作,不需要哭泣@msw:这在很大程度上取决于用户的专业知识以及解决方案需要部署的范围。如果我能帮助的话,我经常避免非标准依赖关系。sureshdharmadurai:你可能想详细说明一下,因为现在我觉得你的问题没有多大用处。据我所知,您希望从文件中删除换行符,将其转换为一行。然而,我怀疑这不是你想要的。