Saving Binary File to .txt file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Bassett

    #1

    Saving Binary File to .txt file

    I need to process data in many binary files. If I open the file in Wordpad
    the data is readable. If I save the file as a Text Document I can process
    the .txt file in VB via the Open and Line Input commands.

    I would like to loop through all my binary files and convert them to .txt
    in VB code instead of manually doing the conversion. Can someone point me
    to the code to do this?

    Thanks,
    Pete
  • J French

    #2
    Re: Saving Binary File to .txt file

    On Sun, 07 May 2006 14:10:32 -0500, Peter Bassett
    <pbassett2223@c omcast.net> wrote:
    [color=blue]
    >I need to process data in many binary files. If I open the file in Wordpad
    >the data is readable. If I save the file as a Text Document I can process
    >the .txt file in VB via the Open and Line Input commands.
    >
    >I would like to loop through all my binary files and convert them to .txt
    >in VB code instead of manually doing the conversion. Can someone point me
    >to the code to do this?[/color]

    Without knowing the format of these 'binary' files, there is not much
    to suggest.

    It is odd that Wordpad will display what we normally call 'binary
    data' meaningfully.

    Where dd those files come from ?

    Comment

    • Hlrsr

      #3
      Re: Saving Binary File to .txt file

      There is not a single answer to what you are asking. The answer depends to
      what you want to do. For example, you want to reject all the non readable
      characters (with ASCII code below 0x20 or 32 in decimal) or just to read a
      fixed amount of data that would fill a line in Wordpad and append to that
      the Carriage Return - Line Feed characters at the end? Or...

      Regards
      GM

      "Peter Bassett" <pbassett2223@c omcast.net> wrote in message
      news:Xns97BC8FD C0BCFApbassett2 223comcastn@216 .196.97.136...[color=blue]
      > I need to process data in many binary files. If I open the file in Wordpad
      > the data is readable. If I save the file as a Text Document I can process
      > the .txt file in VB via the Open and Line Input commands.
      >
      > I would like to loop through all my binary files and convert them to .txt
      > in VB code instead of manually doing the conversion. Can someone point me
      > to the code to do this?
      >
      > Thanks,
      > Pete[/color]


      Comment

      Working...