如何使用批处理文件删除换行 [英] How to delete Linefeed using batch file

查看:611
本文介绍了如何使用批处理文件删除换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用批处理文件删除换行的文本文件。
是否有可能做的事。
请提供一些帮助。

I want to delete Linefeed in text file using batch file. Is it possible to do. Please provide some help

推荐答案

如果你的意思是去除文本文件中的空行试试这个批处理文件:

If you mean removing empty lines from text files try this in a batch file:

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

您可能还需要更换的 inputfile.txt outputfile.txt %1 %2 要用于给定它的名字到批处理文件中的任何文件

you may also want to replace inputfile.txt and outputfile.txt by %1 and %2 to be used for any file given its name to the batch file

这篇关于如何使用批处理文件删除换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆