Click here to Skip to main content
15,749,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Thanx for ur reply people...
I will try to be more clear and appropriate with wat exactly i want...
As you have replied that all files are in the binary format...i need a method to extract this binary content from a file irrespective of the file extension provided i have given the path of that particular file...and store this content in a text file...later when i re execute this binary content present in the text file i want to get back the actual file...
hope this reply has better clarity on my requirement..
Updated 27-Aug-10 19:44pm
krishnakumar_L 28-Aug-10 1:34am    
as Christian Graus said all file are binary . i just want to convert a file to binary and then binary back to file . can this be done ?
Christian Graus 28-Aug-10 1:36am    
All files are binary. There is no conversion. A file IS binary, in the sense that it's a digital representation of data. Your question therefore makes no sense. Still. What do you mean by binary ? What do you want to do with notepad ? Converting ANY format to text is incredibly complex. How do you convert an mp3 to text ? What about an image, or a PDF with a bitmap in it ? An exe plainly cannot be made into text.

Oh - I see. You can do that, what you need to do, is MIME encode your binary. It will end up being a lot bigger, but it will be text, and you will be able to encode it back to it's original format. What you will get is a meaningless stream of characters, so notepad isn't going to help you do anything with it.
Share this answer
Not a terribly helpful reply, but then, your question is meaningless. What do you mean by 'binary' format, and 'store in a note pad' ? All files are 'binary', but notepad cannot show a non text file. Perhaps if you explain what you think your questions means, I suspect we'll explain why you're hopeless confused.
Share this answer
Ok, Listen, We don't want to make the situation worst than what it is. Please raise your hand as high as you can from the keyboard and back off immediately while keeping your hands way high. Don't let me zap you, do you understand. Do not look back at the keyboard . period.
Share this answer
Christian Graus 28-Aug-10 1:16am    
Reason for my vote of 1
This guy obviously is confused, but is this really helpful ? It's sure not an answer.
krishnakumar_L 28-Aug-10 1:48am    
@Yosuf: if you don understand get lost from this not bring down the confidence of the people who want to learn a particular thing...u might not be a rookie but when u started u were..n u might have always seeked for help..don keep that in mind!!
Toli Cuturicu 28-Aug-10 2:35am    
Reason for my vote of 1
Don't byte.
Yusuf 28-Aug-10 3:12am    
I don't see it as he being confused. A confused person does not manifest themselves by garbling something like that. Don't take my word for it. Look at his edited message again. He has no clue of what he talking about. Either he has no basic understanding what a binary file is, or did not understand the requirement. I did not write simply to bash him, rather it took me long time to think it through. Could I be totally wrong, Of course that is possibility, and am willing to stand corrected, but so far I have not seen anything that convince me otherwise.

Why the hell does anyone want to convert binary file to text file. And what do you get? Simply garbage.
krishnakumar_L 28-Aug-10 3:56am    
if u dont understand the question tell the user to ask with a better clarity know...why reply so arrogantly??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900