Skip to content

Recovering a corrupt text file

ChowChow Member Posts: 1,192
edited August 2014 in Off-Topic
My computer crashed pretty badly, and as a result something rather big and precious that I've been working on all year combusted on me. It shows as a 0 kb file and is indeed quite empty if I open it. Fortunately, I did have a backup file, but it's several days old, meaning there's a decent chunk of text that I lost with this and would like to recover.

The weird thing is, if I use the search function to find some text from within the file, it does find them - apparently the entire thing is still there, hidden behind some weird thing that I cannot get through, taunting me. So the crash didn't just save a completely blank bit over the old text, it just placed it over it like some kind of an invisibility cloak.

Any help on how to penetrate this barrier?

Comments

  • Troodon80Troodon80 Member, Developer Posts: 4,110
    Never had that happen. There are methods you can use, such as Microsoft Word (if you have MS Word, that is).

    Other than that, you could possibly use some file recovery software—though they typically deal with deleted files rather than corrupt files, so it is difficult to tell just how much success you will have.
  • The_Potty_1The_Potty_1 Member Posts: 436
    If I was to guess, I'd say the actual file has out of sync with the file allocation table .. except then it probably wouldn't turn up in search .. the above is possibly gibberish.

    Anyway, try scandisk, which sorts out FAT problems, and if that fails, looking at the drive in linux generally reveals all.
  • FinneousPJFinneousPJ Member Posts: 6,455
    What file format on what system
  • ChowChow Member Posts: 1,192

    What file format on what system

    .rtf on Windows 8.
  • FinneousPJFinneousPJ Member Posts: 6,455
    What software are you using to view the file?

    You wouldn't be willing to share the file, would you?
  • ChowChow Member Posts: 1,192
    I used WordPad, which was corrupted by the same thing and now gives an error message if I try to open it. I've tried it on NotePad and Microsoft Office as well, with no better result.

    Not that it really matters anymore: it turned out to be easy enough to replicate what I'd written there, now that I had a good idea on where it was going in the first place.

    Also, no, I would not like to share it. Not yet. Perhaps later.
  • FinneousPJFinneousPJ Member Posts: 6,455
    Alright then. Good thing you didn't lose much.
  • CrevsDaakCrevsDaak Member Posts: 7,155
    When you wanna write something important, make a .txt. Don't worry about it not looking the best--effectivity > look.
  • old_jolly2old_jolly2 Member Posts: 453
    edited September 2014
    I would guess the header of the file is corrupted , not the text within. Based on the same assumption , the WordPad needs to process the header first before jumping to the printing algorithm on the screen. So , "printing on the screen" does not work for you , but you can still search inside it , apparently Microsoft does not have a header check-up for searching algorithm , now this is a fine backwards engineering :)

    Well , I have written something different before , I checked a sample .rtf , and there is indeed the text in plain therein. All you need is to develop an algorithm in C++ , to harvest the text you need and write it into a plain .txt , if you need to save time and the file is too big. Otherwise you can do it by hand and eye , and a lot of time :)
Sign In or Register to comment.