QB45 Forums
Party like you didn't do in 1999.

Programming Talk - View Post
Anything related to programming under the sun

Jofers
ADMIN

Posts: 392
Truncate a file?
Posted by Jofers, on Aug 29th, 2005
Well, the most obvious way is this:

Dim myString As String
Dim TruncateSize As Integer = 3000
Open "myfile.dat" For Binary As 1
myString = Space(TruncateSize)
Get #1, , myString
Close 1
Kill "myfile.dat"
Open "myfile.dat" For Binary As 1
Put #1, , myString
Close 1

But, there's probably a more efficient way. *shrug*

Back to Programming Talk

Replies:
There are no replies to this message

Post a reply:







All content copyrighted 2004, All rights reserved.