How do I delete the last 200 bytes of a file??
And add text to the end of the file ??
Printable View
How do I delete the last 200 bytes of a file??
And add text to the end of the file ??
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
[email protected]
[email protected]
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...