Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Important !! file manipulation

Status
Not open for further replies.

Goha

IS-IT--Management
May 9, 2002
91
0
0
US
how do you append something to the BEGINNING of a file.

I have a file full of data and no header.
I want to place aheader on it

how do i do it

VB6
 
A) Write your header information to a new file

B) Copy the contents of the existing file to your new file

C) Delete the existing file

D) Rename the new file to the name of the old file

Other ways to do it, but that is the easiest (IMHO)
 

Open a new file and print/write your headers to it then transfer the contents of the existing file to the new file. Close both files delete the old one and rename the new one to the old name.

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top