Remove Blank lines

[Home]   [Projects]    [Delphi Techniques]   [Math Topics]   [Library]   [Utilities]

 

Available Now

Search

Google
 

Search WWW             

Search delphiforfun.org

Contact

Feedback:  Send an e-mail with your comments about this program (or anything else).

Help support DFF

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

 

Google
 

Search WWW

Search delphiforfun.org

 

 

Here's a "quick and dirty" little program to remove blank lines from a specified input text file and write non-blank lines to a specified output file.

The program was motivated when our Booksearch Index page somehow had 35,0000 lines with  10 blank characters per line somehow got inserted among 136 valid htm code lines. This expanded the HTML file from 12 Kbytes to 360KBytes and hung FrontPage, my web editor program.

After a 20 minute effort at manually deleting blanks, the job was less than 10%  complete with no assurance that I hadn't accidentally deleted valid lines,  so the manual approach was abandoned.

This program has 25 lines of my code and took about 15 minutes to code and run to complete the job.  Computers rule!  (sometimes)

Addendum August 13, 2006:  A viewer with hundreds of files to fix, wrote asking for a version which would allow multiple files to be selected for processing in a single run.   Version 2, posted today, provides that ability.  Files are selected by the standard multi-select technique;  use Click and Shift-click to select a range of files, use Ctrl-click to select or deselect individual files.  Options are provided to backup files before processing or to provide a new name for each file.

Download source

Download executable


  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright © 2000-2008, Gary Darby    All rights reserved.