Author Topic: Unwanted spaces between rows in a written file  (Read 77 times)

Mykal

  • Newbie
  • *
  • Posts: 2
Unwanted spaces between rows in a written file
« on: May 21, 2023, 11:15:44 pm »
I'm a new Winbatch user.  When writing to a file I end up with each alternate row as a blank row.  I noted somewhere in the help files that something always adds an empty entry but I can't find it again.  How do I get rid of the blanks ???

kdmoyers

  • Sr. Member
  • ****
  • Posts: 488
Re: Unwanted spaces between rows in a written file
« Reply #1 on: May 22, 2023, 04:47:27 am »
Welcome!

This is probably all about line-endings.  Lines can end with CR and LF, or just LF, and sometimes these get automatically added when you didn't expect that.

Can you post the few relevant lines of code from your program? 

Or even better, post a very short stand-alone script that demonstrates the problem?

This is the fastest and most reliable way to get help here on the forum.
The mind is everything; What you think, you become.

JTaylor

  • Pundit
  • *****
  • Posts: 1914
    • Data & Stuff Inc.
Re: Unwanted spaces between rows in a written file
« Reply #2 on: May 22, 2023, 05:42:00 am »
Everything Kirby said plus, if you are using FileWrite() it adds a @CRLF automatically so make sure you aren't adding such things to the data you are writing.

Jim

Mykal

  • Newbie
  • *
  • Posts: 2
Re: Unwanted spaces between rows in a written file
« Reply #3 on: May 27, 2023, 05:57:34 pm »
Thanks Guys.  I've fiddled round with it and seem to have overcome the problem, thanks to your help.  Cheers.