hi
i want to know how to delete lines from text file using command prompt .is there any specific MSDos command for doing this.
or any tool available which read,write text file by running command prompt.

Recommended Answers

All 2 Replies

Not that I know of.
You could create it yourself with about 10 lines of c++/c code?

It depends more on the specifics of what you're trying to do, but the top options that come to mind are using external programs (like sed or grep) to do the removal or if it is simple enough, you might be able to use FOR /F is your version of DOS supports it.

Note that most of the above will need to read from the existing file and write to a new file. You could delete the old file and then rename the new file to the old name, but they won't be able to write it "in-place".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.