Results 1 to 4 of 4

Thread: How do I Delete the last 200 Bytes of a file?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 1999
    Posts
    87

    Post

    How do I delete the last 200 bytes of a file??
    And add text to the end of the file ??

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    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]

  3. #3
    Guest

    Post

    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

  4. #4
    Guest

    Post

    ...that was just to truncate the last 200 bytes.
    You know how to add a string to another...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width