Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Recovering a corrupted .txt file

29 Jun 2016   #1
xcr

Windows 7 Home Premium 32 bit
 
 
Recovering a corrupted .txt file

I would like to recover a corrupted Notepad (actually, Notepad2, but I guess its's the same) file: I previously saved it, then edited, and with the unsaved edits, a power outage made it unreadable. The file is full of [NUL].

I tried CHKDSK. It has found no errors.

I tried this as well: https://superuser.com/questions/2236...upted-txt-file
Here, the 2nd answer with the Recuva method. Now, previosly I had a very similar instance, when this one worked very well, now not so.

What other hope do I have?


My System SpecsSystem Spec
.
30 Jun 2016   #2
xcr

Windows 7 Home Premium 32 bit
 
 

I'm sorry, I'm honestly not sure if I posted this to the right forum. (Where else?)
My System SpecsSystem Spec
30 Jun 2016   #3
RolandJS

Windows 7 Professional 64-bit
 
 

Time as we know it does not exist in forums across The 'Net.
I have some experience recovering/"re-writing" text files. Is the file now in a safe place, where it cannot be accidentally deleted? I take it there are no ghosts of this file lurking on the hard-drive? Meaning, you have already tried to find and recover earlier and later versions of this textfile, correct? Download and install both editplus [free version] and metapad, we might need their reading and editing powers.
My System SpecsSystem Spec
.

01 Jul 2016   #4
GEWB

Linux (Mint is primary) / XP, Win7 Home / Win7 Pro, Ultimate / Win8.1 / Win10 archived VM
 
 

If it is a small file, try using a HEX editor. You will be able to see the available text then create a new text file in Notepad.

Other option is to learn the structure of text files and rebuild the corrupt file in the HEX editor but that takes some work.

Regards,
GEWB
My System SpecsSystem Spec
05 Jul 2016   #5
xcr

Windows 7 Home Premium 32 bit
 
 

@GEWB

All the HEX editor editor sees of my file is, zeros. Lots of zeros. That's it.

@RolandJS

Actually, my text file contains, (contained?) sensitive information, I cannot send it to you. I tried to replicate it, like writing full a text file, saved it, writing some more, then without save, unplugged the computer, to no avail; I did not managed to replicate it, with non-sensitive text so far. ;(

Quote   Quote: Originally Posted by RolandJS View Post
Is the file now in a safe place, where it cannot be accidentally deleted
Yes, sure, I made copies of the file.

Quote   Quote: Originally Posted by RolandJS View Post
Meaning, you have already tried to find and recover earlier and later versions of this textfile, correct?
Yes. All I found was, Recuva converted all the NULs into something different.

The alternative file starts with:
Code:
SQLite format 3
Besides NUL, it contains also EOT, SOH, ETX, ENQ (maybe etc.)

And extended ASCII characters like:
Code:
–GOR‹Š
Quote   Quote: Originally Posted by RolandJS View Post
Download and install both editplus [free version] and metapad, we might need their reading and editing powers.
What's the methodology with these two editors? What are my hopes?

Thanks for both of your help!
My System SpecsSystem Spec
05 Jul 2016   #6
LMiller7

Windows 7 Pro 64 bit
 
 

Text files contain no redundancy or defined format. That means any recovery of a corrupted file is going to be problematic at best. A hex editor is just a tool that allows you to examine and edit the file in it's raw form, including portions that are corrupt. A standard text editor would likely remove most of the file. But a hex editor is just a tool and requires human judgement and knowledge of the file to make it work. Likely you could do little more than remove corrupted portions of the file. What's left may or may not be useful.

Edit: If the corruption is the result of the file being completely overwritten with junk or unrelated material then there is no possibility of recovery.
My System SpecsSystem Spec
05 Jul 2016   #7
GEWB

Linux (Mint is primary) / XP, Win7 Home / Win7 Pro, Ultimate / Win8.1 / Win10 archived VM
 
 

Quote   Quote: Originally Posted by xcr View Post
@GEWB

All the HEX editor editor sees of my file is, zeros. Lots of zeros. That's it.

@RolandJS
Not a good sign.

Did you view it all the way to the end file marker?

Regards,
GEWB
My System SpecsSystem Spec
05 Jul 2016   #8
Eric3742

Windows 7 x64
 
 

There a this prog
PDF, DOC, DOCX, DAT, BIN, PHP Viewer - FreeFileViewer

There is a possibilities the text file still exist somewhere.

Go to Windows\Users\your_username\AppData\Local\Temp

The folder AppData is hidden.
You can change the "your_username" to your account name
Then highlight from "Windows\.......\Temp"
Open your explorer, select the C: drive and paste it on top

This is the Temp files for all types of files that was saved (depend on setting) while you are working even when sudden system cut-off.
You can arrange by Date/Time of the files.
Check the latest, and ignore with or without .txt &or funny chars.
My System SpecsSystem Spec
05 Jul 2016   #9
RolandJS

Windows 7 Professional 64-bit
 
 

Metapad acts like Notepad on steroids. EditPlus, free or pay-for, is simply another document reader/writer. Based on your description of hex-view showing your file filled with 0s and more 0s -- doesn't bode well. However, aim one or both of the above at your file and see what you can see. If there is any viable, visible, text -- such will let you copyNpaste said text into a new good text file.
My System SpecsSystem Spec
15 Jul 2016   #10
xcr

Windows 7 Home Premium 32 bit
 
 

Everyone,

On your recommendation I tried common HEX editor, Metapad, EditPlus, and even FreeFileViewer (Though the latter installed clickware on my machine, for what it's worth, even though I was as careful as possible).

Basically, with all editors, the result is the same: my original text file is full of zeros.

This aspect, however is a little bit more interesting I mentioned before: when I ran the text file through Recuva (see this: https://superuser.com/questions/2236...upted-txt-file; Here, the 2nd answer with the Recuva method. Now, previosly I had a very similar instance, when this one worked very well, now not so) it didn't turn my text file readable, like in the Super User example, but something like this (I quote myself again):

One
Code:
SQLite format 3
And the other:
Code:
–GOR‹Š
And many more like this.

The two questions I ponder:

- Why Recuva didn't recover my file, if it recover the file of the Super User user?

- Even if my text file can't be saved, how did it turn to all zeros, if I saved it previously, I just didn't save the incremental changes before the the power outage? For my technical interest. It was on an NTFS partition.

@Eric3742: I sure don't have any backup of Windows, Temp, System Files, AppData, things like that, I use Toolwiz Time Freeze which restores my Windows after every restart.
My System SpecsSystem Spec
Reply

 Recovering a corrupted .txt file




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
My file is corrupted
I have some pdf file which is corrupted by affecting a malware. I searched the web to find out how to repair it but no good result! Do you know any real way to repair it please
General Discussion
Bitlocker key problem: Brute Force or recovering the key file?
Hello, I have full disk encryption with BitLocker. The key file for windows partition was on my USB disk, other drives were protected by password and also they're set to automatically unlock. Yesterday, I found my USB disk corrupted. When I performed chkdsk on it, everything went fine...
System Security
Help: recovering file
i deleted my desktop icon in my personal file. now everytime when i open my download file, it will pop out a msg box stated that c.\User\User\Downloads\Desktop refers to a location that is unavailable. It could be on a hard drive on this computer, or on a network.Check to make sure that the...
General Discussion
Recovering emails from Outlook pst file
My laptop died last week. Fortunately the hard drive was unaffected and I have this now in a USB enclosure that I can access via my new laptop. The problem is that the old machine came pre-installed with the SBE version of Office 2007 whereas the new one came with a trial version of Office...
Microsoft Office
External HDD with all pictures corrupted. Help with recovering.
I have an external HDD that I've been using to store pictures on, as I've gone through various computers I've used it to keep them safe. It corrupted today and how do I recover it. I live in a small town (in canada) and the only tech store is The Source, can they recover stuff from hard drives or...
Hardware & Devices


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 13:58.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App