Multi-Content File?

Home » Programming & Design » Multi-Content File?
Programming & Design No Comments

I m just curious if this is possible.

Say I have a computer file called power.txt with some writing in it. I rename it to power.mp3, and it becomes a proper music file. Finally I rename it to power.png, and it becomes a picture of a cat.

Is something like this possible? Could a file be made to contain multiple

I m just curious if this is possible.

Say I have a computer file called power.txt with some writing in it. I rename it to power.mp3, and it becomes a proper music file. Finally I rename it to power.png, and it becomes a picture of a cat.

Is something like this possible? Could a file be made to contain multiple types of data, depending on what it s file extension is?

Best Answer:

H: You CAN put multiple content into a file, but not just by changing the name.

A special program would have to be written to create the file and a special program would have to be written to use the file.

However, you can copy image files into word processing documents

Other answer:

H:
No, changing the three letter name extension does not magically change the contents of the file. It just changes which application will be started when you double click on the file.
Then that application will open the file and try to interpret the data in it.
Since the contents of the file is unchanged, the original text is still text, the picture viewing applications will view the file as corrupt and generate errors.
Undisclosed:
That's a negative. The probability that any file can even make sense in both .png and .mp3 form is so unbelievably remote I would bet you money that we'd both live to see the sun burn out before we saw that happen. File extension is a cue to programs on how to read the file, but changing that extension doesn't change the code/binary within the file.
Aerialnine:
Simple answer….no…..a text file can never become a music file…a music file can never become a picture file…..
chrisjbsc:
No.

LEAVE A COMMENT