WinXP screwed itself on my system last week so I built a new machine on a separate drive and added the old drive as a secondary to it. Windows could see the drive but the formatting was messed up so I ran a disk recovery utility on it, which allowed me to recover almost everything I needed. Unfortunately, there were 2 text files on which I frequently took notes that I recovered, but when opening them up, they were corrupt. I think the cause was that they were always open in Notepad++ so when Windows crashed and burned, it may have corrupted them. Is there any way for me to recover the text within the file or any temp directories I can check on the old HD in case Windows had a working copy somewhere?


From linux I've had luck in a similar situation by grepping the raw drive for strings from the text file.

grep -C 42 'string I know is in text file' /dev/sda1

where 42 is some number of lines of context and /dev/sda1 is the block device for your partition.

This may get you an old version of the file and will only work on a 4K chunk of the file at a time, but it will work if the data is still on the drive at all.

  • +1 I don't know if it'll help him under Windows, but that is a great tip! – Clinton Blackmore Jul 21 '09 at 17:44
  • It's a useful trick, but in any data recovery, you should be working on an image, not the original disk. – Dentrasi Jul 21 '09 at 18:34
  • @Dentrasi absolutely, assuming you have anywhere to put the image! – Captain Segfault Jul 21 '09 at 20:56
  • Windows has a similar functionality in the search tool called "part of file" (I think) but it's uber slowwwwwwwwwwwww (but probably not as slow as the grep command above). But if you're desperate then speed is probably not an issue. – Mark Henderson Jul 21 '09 at 21:33

Try "R-Studio" application. I had problems with corrupted files when used other software, but this one did the job perfectly.

If it fails, i guess, these text files are not recoverable at all :(

Also note: when a file is opened in an editor - nothing special happens. It's just displayed from RAM copy. But when you save it, it's actually written to disk (and also some caching occurs), so this can't be the reason.


  • I ran a utility that I think uses the same engine as R-Studio, Restorer Ultimate. – Agent Jul 21 '09 at 20:39

My suggestion is similar to o_O Tync, but I recommend GetDataBack - it has recovered lost files for me on many occasions.

  • I've also ran GetDataBack on the drive and the same corrupt text shows up, but other text files show up fine. – Agent Jul 21 '09 at 20:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.