Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 3rd, 2004, 08:06 PM
Registered User
Join Date: Mar 2004
Location: O, ON, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how can I insert a new line at top of text file?


does anyone know of a way to insert a new line at the beginning of a text file? It can't overwrite the existing first line. Seems like a simple thing, I know, but it seems there is no easy way to do this.

There's nothing that I can see in the stream writer or file system objects to do this, and I've been searching for many hours and it seems like this is not a common thing (which is probably why there's no info readily available on it).

Any ideas?


Reply With Quote
  #2 (permalink)  
Old March 4th, 2004, 03:41 AM
Friend of Wrox
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000

the easiest is to get the file and rewrite it

Ahmed Ali
Software Developer
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
insert a new line at beginning of text file? how? Satorikin VB.NET 2002/2003 Basics 8 October 15th, 2008 09:55 PM
store a single line of text from a file....how???? danielnixon General .NET 2 May 1st, 2008 12:09 PM
Most efficient way to insert text into a file StumblingInTheDark Visual Basic 2005 Basics 1 February 22nd, 2007 01:09 PM
How to read a line from a text file ? nobitavn94 C# 3 November 25th, 2006 11:04 PM

All times are GMT -4. The time now is 04:35 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.