Solved

How can I delete a line in a text file?

Posted on 1998-02-05
1
136 Views
Last Modified: 2010-04-04
  I can use "Writeln" write a line and use "Readln" read a
line from a text file, but how can I delete a line?

                                    (Thanks a lot)
0
Comment
Question by:thecon
1 Comment
 

Accepted Solution

by:
TechStone earned 50 total points
ID: 1358400
The simple answer is, you can't.  Text files are written from the beginning to the end, and that's it.

In order to delete a line, you must read the file and write all lines but the one you wanted deleted to another file.  I know that sounds like a long way to do things, but that's how text files work.


0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now