Ask Leo!

I deleted a file by mistake - can I get it back?

Home » Windows

Summary: It is sometimes possible to recover an file deleted by accident. Stop using the disk, check your recycle bin, and perhaps pull out an undelete utility.

I got carried away and mistakenly hit "Yes" when I was prompted about deleting a file - except it was the wrong file! Can I get it back? If so, how?

I think anyone who's used computers for any length of time has been where you are now. I know I've been there on more than one occasion.

The answer to your question is really, "maybe". It depends on a lot of things.

"First ... stop using the disk that had the file."

First, and this is important, stop using the disk that had the file. I'll explain why in a second, but to increase the likelihood that the file can be recovered, stop doing things that might write to the disk. That even means leaving your programs running - since many will write to the disk as they exit - and it means do not browse the internet, since the browser will write it's history do disk. (Unless, of course, you know that the file was on a different disk than the operating system or other items.)

Now, first things first - look in the recycle bin. If you deleted the file using Windows Explorer, or many of the standard Windows controls, the file might not actually be deleted - just moved into the Recycle Bin. If that's the case, you can simply move it back out of the Recycle Bin to wherever you wanted it to be. Do move it out, because if the Recycle Bin is emptied then the file is truly deleted, and things get harder, as we'll see next.

If your file wasn't recycled, perhaps because you deleted it in a Command Prompt, some other program deleted it, or you were holding the SHIFT key down when you deleted it in explorer, the file has really been deleted. However, the contents might still be recoverable.

Deleting does not, by default, overwrite the data in your file. All it really does is say "OK, this disk space over here, that used to be a file? You can use it for other things now." The contents of the file actually doesn't disappear until it's been overwritten by something else. That's why it's so important to stop doing things to the disk that contained the file. Any writing to the hard disk after you've deleted a file could overwrite it's contents.

There are a lot of "undelete" utilities available. A Google search on undelete files returns a long list of utilities. I currently have no particular recommendation, but do make sure that the undelete utility supports the format of your disk (NTFS, FAT or FAT32 - running "chkdsk" in a command prompt will tell you).

Remember I said don't write to the disk? That probably means you'll need to search for, and download, an undelete utility using a different computer entirely, and use a floppy or CD-ROM to take it to the computer experiencing problems.

If you've not done anything to the hard disk since the file was deleted, the undelete utility should find it and be able to recover it for you. If you have been using the disk, then it's an unpredictable roll of the dice. It depends on how much has been written to the disk, where on the disk it was written, and where on the disk your now-deleted file used to reside. It might work. It might not.

There is one, last, hope - but it's expensive, potentially time consuming, and really only for the most dire of circumstances. It is sometimes possible, using advanced data recovery techniques, to recover data even after it's been overwritten. It requires special equipment and special techniques, so you'd be sending your hard drive to a data recovery service. And you'll be writing a fairly large check. There are many factors involved, and it's definitely not as easy as you might see on TV, but it can, sometimes, be done.

My ultimate recommendation? Regular backups. This situation happens to me often enough that I have been able to save hours of valuable time by simply recovering a deleted file from my regular backups.

Related:

Article 9764 | Posted February 1, 2006

Recent Comments

hi leo,how r u?? can u get my freind email password ?? ---->rouba_el_moussaoui@hotmail.com
plz plz plz i need it:s

Posted by: hadi yassine at February 4, 2006 01:45 PM

Yes Leo, you're completely right ...


Files can be deleted and can be *deleted*; meaning that you can "recycle" a file (i.e. move it to the Recycle Bin), and then issue an "Empty Recycle Bin" command/operation, which in fact doesn't delete the actual contents of the (physical) file on a hard-disk, but it only makes these areas available for future writes; as Leo has already written in the article.


And in my opinion this is somehow similar to reformatting a partition, i.e. the actual data are not overwritten (like in case of the so-called "low-level" format; where the hard-disk is overwritten by zeros or random patterns), but only "marked" as non-occupied, however, the actual data are physically still intact on the hard-disk and can be therefore easily recovered till this area on hard-disk is written to for the first time after deleting the respective file. But even then the data can be retrieved by forensic professionals; but please don't ask me how, because I simply don't know.


From my own experiences, I would recommend two programs; as first an application called "Handyrecovery": http://www.handyrecovery.com/index.shtml (it was free back then when I've used it, but I think it's not anymore) and "PCInspector - File Recovery": http://www.pcinspector.de/file_recovery/welcome.htm, which is a program that besides recovering deleted files can even resce files from corrupted hard-disks and partitions.


P.S., If anyone is interested, please read the "I ACTUALLY DID IT ... I rescued the data from a totally screwed disk !!" thread: http://episteme.arstechnica.com/eve/ubb.x/a/tpc/f/99609816/m/758006059631, that I opened on ArsTechnica forum back then for more info on how I managed to get most of my data back from a totally corrupted/screwed partition with a PC Inspector - File Recovery program mentioned/linked above.


best regards,
Ivan Tadej, Slovenija, Europe
http://www.tadej-ivan.be (redirect)
http://users.volja.net/tayiper (direct)

Posted by: Ivan Tadej at February 4, 2006 06:33 PM

Hello,
My name is Erica and I am a Technical Support Manager in SoftLogica LLC.
In fact,Handy Recovery 1.0 is still available; you can download it directly at http://www.handyrecovery.com/handyrecovery-fw.exe

Posted by: Softlogica at February 27, 2006 12:47 AM

Thank you all for helping me recovering an important document ! I hope it will work ! Thanks again. Sorry for my English... ;) Bye all

Posted by: Bogdan - Romania - Gorj - Rovinari at March 4, 2006 05:31 AM

very very lots of thanks to "Erica->Softlogica" really this uttility recover my valuable data.
i would also like to give my thanks Mr.Leo.

god bless all

Singh Mahendra

Posted by: fantoos001 at March 25, 2006 11:55 PM

I suggest you use data recovery software such as [URL=http://www.easeus.com]EASEUS Data Recovery Wizard[/URL] to recover files.

Download demo version: http://www.easeus.com/download.htm

You can use "AdvancedRecovery" to scan your corrupted partition. After the scan is complete, the lost file will be displayed in Data Recovery Wizard, you can select them and recover them.

Posted by: chloe at April 19, 2007 12:43 AM

As you close comment at history part soo i post comment here. Is there any why i can save google search history,firefox and internet search history before deleteing them all.

Posted by: ujval at August 3, 2007 01:59 AM

I deleted the sound application from my laptop. how do i get it back?

Posted by: Sergio at September 27, 2007 06:47 AM

hi leo,
i saved precious pictures of my son a year ago,,,
i opened it to view them,i was playing the video when it stock,i exit it,but then to find out that it was broken,if only i saw earlier that it was broken i could have copied it first,,, up to now i dont know what to feel,,, my knees are weakening everytime i try to open it but still its not there.i hope that you can help me,,, i've been searching some ways in the internet but still nothing happen.i cant afford to buy them too.your my only hope.thank you in advance, and thanks also for time you gave me by reading.

Posted by: geraldine at September 12, 2008 09:41 AM

Post a comment on "I deleted a file by mistake - can I get it back?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

New!

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

Please wait. Your comment is being processed ...


Ask Your Question:


ask-leo.com
Web

Stay Informed

Weekly Newsletter

Archives

By Category
By Date

Advertisers

Advertise on Ask Leo!

««   »»

Question? - Ask Leo!
Who is Leo?
Link to Leo!

Terms, Conditions & Privacy