473,324 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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
May 7 '06 #1
2 10692
On Sun, 07 May 2006 14:10:32 -0500, Peter Bassett
<pb**********@comcast.net> wrote:
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?


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 ?
May 8 '06 #2
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" <pb**********@comcast.net> wrote in message
news:Xn**********************************@216.196. 97.136...
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

May 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: G-Factor | last post by:
Hi all I've just started learning about saving files. I got bit of a problem. The following code gives me an error about incompatible types. (Cannot covert from class character to char *). I...
4
by: Michael Kennedy [UB] | last post by:
Hi Everyone, I have this multithreaded C# windows forms application which does a lot of image processing. Occasionally, I get the following error: A generic error occurred in GDI+....
4
by: Jerivix Entadi | last post by:
I'm attempting to create an application to work with a fluid database of people. I'm doing this in a command line, text-based manner. I need to know two things: 1) How do I save data, perhaps a...
4
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any...
12
by: imme929 | last post by:
How do I do it? Nothing in the books is helpful. I need to save a structure with different data types.
4
by: adamrobillard | last post by:
Hi, I have always used fopen and FILE* to load and save structures to file. I am trying to convert all the older code to use proper C++ calls... the following code works properly but I would...
8
by: Mark | last post by:
Hello. I am attempting to write binary data from a file to an OLE Object field, and then write the file back out from the database. I am reading and writing the files in binary mode, and using...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
1
by: valentju | last post by:
Hi, I am using VB 6 to do the following. I am currently saving a jpg image to a sql db, I read the jpeg via an OLE in binary tye 1 format and store in to the sql db. Attached is a portion of the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.