View Full Version : Recovering corrupt .blend files

23-Jul-08, 16:21
I recently used Scalpel to recover files from a bad hard drive. I used BLENDER_v for the header and ENDB for the footer. It was able to find about 60 files that worked, but 14 files did not.

One day I decided to edit one of my .blend files in Notepad and I ended up adding (or deleting, I don't know which) a couple spaces at the end. (don't ask why) When I tried to open the file in Blender, it came up with an error 'file is incomplete'. Reversing what I did before to edit it did not fix the file.

The problem in both situations is essentially the same. The whole file is still there, but it Blender says that the file is incomplete.

I can get a couple .blend files if you want

23-Jul-08, 18:09
did you check if you had some autosave file in the tmp folder

that might help for some of the files!


23-Jul-08, 20:53
Sometimes using append can get you into a corrupted blend file to recover assets by copying them into a good file. Open a new blender file, and use File>>Append or Link to see if you can open the bad file. If it opens, navigate to the objects (materials, whatever) and append them to the new file.

24-Jul-08, 11:46
The autosave folder has been destroyed. Appending did not work.
I believe the solution is actually quite simple:
-Make a new blender file.
-Edit in Notepad (or some other text editing program) and type 'blah blah blah' at the end.
-If you try to open it in blender, it will then say 'loading .blend failed. File incomplete'
-If you try appending, nothing will come up.
-Now try erasing the text you just put in
-Blender still comes up wtih an error message and can't append anything

Now why is this? The file is exactly the same as it used to, but blender can't read it anymore. Does anyone know why?

24-Jul-08, 12:39
For those that want the technical details: The file recovery program was able to find about 60 files that ended with ENDB. However, about 14 files did not end with ENDB. The program found the BLENDER_v and then kept on going and going (usually through several other files) until another file had ENDB in it. The result is a file with the blend file at the very beginning and maybe 10 different files after it.

This is sort of like adding the blah blah blahs at the end only it is a lot longer. Now if I tried to edit the file and delete the extraeneous text, blender still will not recognize the file, even though it is back to normal.

24-Jul-08, 13:09

Blender files are not plain text files. If you save a Blender file as a plain text file it will never work again.

Unless I'm wrong :-)

24-Jul-08, 13:45
may be it;s only that !
good luck


24-Jul-08, 14:09
Ok. I am going to edit the file in the hex editor instead of notepad. It is very difficult to know when exactly the blend file ends.

Could I get about 20 examples of how your (this is to everyone) .blend files end. (just look in notepad and look at the last 5-10 characters.) Make sure they don't end in ENDB, since I have recovered all the ones that end in ENDB.

And DON'T save the file in notepad!

24-Jul-08, 14:49
Alright, I just checked about seven .blend files from the blender-materials.org:
Header: IF8B080000000000000BEC7D
Footer: 0200

All the other .blend files I checked:
Header: 424C454E4445525F76
Footer: 454E4442

Download Hexplorer (to view hex) at

24-Jul-08, 15:25
your good file should provide you with the data required

but this is if there is nothing else changed in the blend file
but you want find this with the editor !

let us know what happened


24-Jul-08, 15:50
You have to understand that all blender files do not end or start the same.

The blender-materials ones did not start with BLENDER_v (in hex that would be 424C454E4445525F76) or end with ENDB (hex= 454E4442).

I just wanted to know if anyone had any files that started with BLENDER_v but don't end with ENDB. You could check that in notepad. If you do, I would deeply appreciate you posting the exact hex code of the last ten characters (you can find the hex with the hexplorer program - see the link above). Or you could post a copy of the blend file up here.

I am trying to find all the common occurrences for header/footers in blend files so that I can recover all of them. And hopefully if I find them, it can help everyone else who has corrupted .blend files.

I don't have enough blender files (currently I have none) to find pattens and ubiquitous header/footers to do this. So I am asking everyone who has a blend file that doesn't start with BLENDER_v and end with ENDB, to post them (or the hex code) so that I will have enough blender files to figure out patterns....

Okay you get the point.

24-Jul-08, 16:15
i tried to open a blend file
but cannot read the tet on the left in hexa

how do you zoom in ?
hoow did you get the data that your looking for ?
at the beginning or end of the file ?


24-Jul-08, 16:38
In the view tab select options. Make the font Fixed Roman Large. What you see on the left is the hex and what you see on the right is the actual file in ASCII code. When you click (or highlight) something on the right it will highlight it on the hex side.

I am looking for the first ten characters of the beginning and end in hex. (plain characters could be a variety of hex and I wouldn't know wich one it really is) Use the scroll bar to scroll to bottom or top.

24-Jul-08, 16:49
and then what menu did you choose so that i can give you a snap of it
with what you need

sorry but i got go for a while be back in about 3 hours


24-Jul-08, 17:33
Once you have the file opened, I will need the first 20 numbers/text that come up (the first three columns). If you look in the right panel (you may need to scroll over there) the characters for this hex might be something like BLENDER_v... (it doesn't have to be this)

I also need the last 20 numbers/text (at the very bottom of the file) that come up in the last 3 columns. Make sure they are not just all zeros. I do not need any of your code if the right panel says ENDB at the bottom.

An example:
Header (the top code): 0060F23C8F
Footer (the bottom code): 0060F23C8F

Or you could post the actual .blend file
Or you could post a screenshot of the top and bottom from Hexplorer.

I really need everyones help with this for me to figure out how to recover corrupt .blend files.
Make sure your blend file does NOT end with ENDB, I don't any of those.

24-Jul-08, 18:41
but i'm not used with this program sorry

so which menu do you select and which option to get what your looking for
there are so many option avaialble that i don't want to sent 20 pages to you
one is enough but with the right information


24-Jul-08, 18:49
begin and end of code i think


24-Jul-08, 18:56
ya like that.
Only I need the other side, not the side with the plain text.
A shot of the left side (hex) beginning and end.
The first 3 columns and the last 3 columns.

Or (for the pictures attached) you could post it as:
Header:42 4C 45 4E 44 45 52 5F 76 32 34 36
Footer:F3 43 00 1C F3 43 00 1C 45 4E 44 42
instead of uploading pictures...

24-Jul-08, 22:00
first 3 lines

last 3 lines

hope this is enough

24-Jul-08, 22:13
Ya, that's perfect. Thanks.
I have about 8 more files I found off the internet that I am going to check. So I only need about ten more from everyone else!

24-Jul-08, 22:15
and why do you need so much?

this won't tell you if there is something wrong in the middle of your files
which are corrupted - this could be anywhere inside your file
and not necessarily at then end of the file?


24-Jul-08, 23:02
Oh, sorry for the confusion.

The files are 'corrupted' because there is extraneous text after the .blend file. The whole blend file is still there (perfectly fine) but it is inaccesible.

When somebody's hard drive crashes and the file system is damaged, they won't be able to look at any of their files anymore. So they have to run a program like Scalpel to try to recover all their files from the damaged hard drive. Programs like this will try to find a header and footer to specify where the file is.

I used BLENDER_v to specify the start of a .blend file and ENDB to specify the end of the file. The problem with this is, even though ENDB is a common footer for .blend files, not all blender files end with ENDB. For the ones that don't end with ENDB, the program keeps on going, and going, and going (through many other files located right next to this blender file) until it finds an ENDB. The program thinks that was the end, but it really picked up about 10 other documents after the real end of the blender file.

Which leads to why I need so much files. I am trying to find out all the possible footers for a blender file. That way, if a file doesn't end in ENDB, it can find the end with some other footers.

Currently, my list is at two:
1- 0200
2- 454E4442

I hope that made sense...

I'm finding them basically at sites with blender tutorials that have example .blend files.
And usually, the corruption doesn't occur very often. At least, this is the only case I know of. And that isn't really a corrupted .blend file. I guess...

I have to go to sleep now. So I can't run any more tests. If someone else does...though...

18-Aug-08, 22:12
Just to give you guys a quick update:
I found out that is extremely rare that any files do not start with BLENDER_v and end with ENDB. In fact, I couldn't find any files.

What really happened:
When your computer saves a file, it will cut it up and stick all the parts in empty slots in your hard drive. So if you have a file that doesn't end in ENDB, you can be pretty sure that the other half of the file is somewhere else on your hard drive. This means, if your file system has been destroyed, you basically lost all those blends.

However, there may be a number of files that did not get split (I had about 68 unsplit files). You can run the Scalpel program with a header of BLENDER_v and a footer of ENDB and get some of your files back.

I also got Golden G. Richard (the creator of Scalpel) to put the blender file format on the recovery list. So when the next version of the program comes out, the .blend file type will be one of the file formats available for recovery!

Well, that's all for now...

19-Aug-08, 05:18
Good work; I hope I never have to benefit from it though.
Keep backup copies !