remove blank lines from text file

If you have a new question you’d like our support staff to post a response to, please visit our customer community, Data Security Insiders, to pose the question in our Discussion Boards. We have a thread “Ask Our Tech Experts” that our support team monitors on a regular basis, or you can start a new discussion where other GoAnywhere users and support staff can weigh in. Log in or create your new account at

If you need an immediate response, please create a support ticket or contact our support team by email at [email protected].
3 posts Page 1 of 1


Posts: 8
Joined: Fri Feb 24, 2017 9:40 am

Post by fthomas » Wed Apr 05, 2017 2:55 pm
I have a project where I am:
saving the message body of an email to a text file.
Reading the flat text file at line 7, skipping empty rows (this strips out some unneeded header information)
performing a search and replace to remove a line of text at the bottom of the flat file with system.emptyString

The result is the lines of data I want and two blank lines. When I try to read this as a fixed width file to insert I am getting an invalid record error. Apparently this is due to the blank lines. If I manually remove the text at the bottom of the text file there are no errors.

What's the best way to delete blank lines from a flat or fixed width file?


Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Thu Apr 06, 2017 9:14 am
Have you tried the "ModifyRowSet" task?
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696


Posts: 8
Joined: Fri Feb 24, 2017 9:40 am

Post by fthomas » Mon Apr 10, 2017 3:46 pm
I thought about that.. And now I realize I wasn't employing it early enough in the process. That worked.
3 posts Page 1 of 1