Or just use Trim() on the variable containing the file content and then write it out again.
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 11 December 2001 14:44 > To: CF-Talk > Subject: Re: Trimming Files > > > Depending on what line separator(s) are used... you can do it > a few different ways. > But ones that come to mind this instant are... > > 1. Use a regular expression, I don't use the builtin regexp > coldfusion stuff > 2. Search and replace on two instance of the separator(s), > then clean the last line, if exists > 3. Loops lines and manually parse, removing > startline+whitespace+endline if it appears > 4. Write or have someone write a simple custom tag that does > this if you need efficiency, future use, & ease. > > ----- Original Message ----- > From: "C. Hatton Humphrey" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Tuesday, December 11, 2001 8:40 AM > Subject: Trimming Files > > > > Does anyone have a quick way to trim extra lines from a text file? > > > > I have an app that uploads a text file and processes it as > a TSV file, but > > some users are exporting from MS Access, which is adding > some extra line > > feeds to the end. Any suggestions? > > > > C. Hatton Humphrey, Developer > > Fisher, Towne & Associates > > 716-839-2141 x336 > > [EMAIL PROTECTED] > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

