Click to See Complete Forum and Search --> : How do I Delete the last 200 Bytes of a file?
Zleepy
Oct 15th, 1999, 03:16 AM
How do I delete the last 200 bytes of a file??
And add text to the end of the file ??
Aaron Young
Oct 15th, 1999, 04:05 AM
You would need to Read the File in and Output it again, excluding the last 200 Bytes. If it's a Text File use Input/Ouput else use Binary Access File.
------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net
dim qwe as string
open file for binary as #1
qwe = space(LOF(1))
get #1 , , qwe
close #1
MyTruncatedString = left(qwe,len(qwe)-200)
'hope it helps
...that was just to truncate the last 200 bytes.
You know how to add a string to another...
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.