Login | |
|
 |
Re: save to top of text file - 6/13/2005 2:02:39 AM
|
|
 |
|
| |
mbouchard
Posts: 1922
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
Something like this Const ForReading = 1, ForWriting = 2 Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") NewString = "What ever you want here" & vbcrlf Set f = fso.OpenTextFile("c:\testfile.txt", ForReading) ReadAllTextFile = f.ReadAll f.close NewFile = NewString & readalltextfile Set f = fso.OpenTextFile("c:\testfile.txt", ForWriting, True) f.write NewFile f.close
|
|
| |
|
|
|
|
|