2

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

Joey
  • 344,408
  • 85
  • 689
  • 683
user375191
  • 123
  • 2
  • 4
  • 7
  • 1
    Do yourself a favor, don't try to do useful work in dos-batch, it will make you cry. Instead try `flip`: it's old, it works, no crying needed. https://ccrma.stanford.edu/~craig/utility/flip/ – msw Jun 25 '10 at 06:40
  • 2
    @msw: That pretty much only depends on the expertise of the person doing it and how widely the solution needs to be deployed. I frequently avoid non-standard dependencies if I can help it. sureshdharmadurai: You may want to elaborate a little because right now I don't see much use in your question. As I understand it you want to delete line breaks from the file, converting it into a single line. However, I suspect that's not what you'd want. – Joey Jun 25 '10 at 11:27

1 Answers1

1

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

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

mmonem
  • 2,811
  • 2
  • 28
  • 38