Herfried,
If the creation timestamp is important, then this would be a downside of the
method.
However! ;-)
I have not played with IO.FileInfo enough, the CreationTime property is read
write, you could 'copy' the attributes from the original file's FileInfo to
the new file's FileInfo and that would update the actual file, thus
preserving the creation timestamp...
Hmm... Touch.NET (simple sample Console Application demonstrating the above)
Public Module MainModule
' args(0) = file to change
' args(1) = properly formatted creation date time
Public Sub Main(ByVal args() As String)
Dim fi As New IO.FileInfo(args(0))
fi.CreationTime = DateTime.Parse(args(1))
End Sub
End Module
Which will set the creation time of the file given to the date given.
Something like:
Touch myfile.txt 10/1/2003
Hope this helps
Jay
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
* "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> scripsit: Largely because of the size of the file. I would consider writing the
new line to a new file, then using Asynchronous File I/O to append the
existing file on the end of this new file, delete the old file, then rename the
new file to the original name...
This will change the creation timestamp of the file.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>