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

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.

Stop – just stop

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.)

Recycle Bin

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.

Undelete

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 recommend Recuva which will scan your disk and display all the files that could possibly be recovered.

Whatever tool you use 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.

The big (expensive) guns

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.

Prevention is so much easier than the cure

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.

This is a minor update to an article originally posted : February 1, 2006

There are 22 comments:

  1. Ivan Tadej Reply

    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)

  2. Bogdan - Romania - Gorj - Rovinari Reply

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

  3. fantoos001 Reply

    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

  4. chloe Reply

    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.

  5. Sergio Reply

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

  6. geraldine Reply

    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.

  7. rose Reply

    this may sound weird but i really like your comments here.. i dont have a coment for now but i do have aquestion regarding this theme. i now some of the programs for undelete. but my problem is regarding not deleted files but moved files for example if you click deleted on file you can get it back with a undelete program. but if you seleste cut and paste. somewhere any of does softwares dont recognize does files .. my question is how can i get back files that i moved from a hard drive… ? sorry about gramar im from tijuana Baja California Mexico.. y hope any one here can just give me a tip/ about it!! thanks alot!! cheer on!!

  8. Brian 500 Reply

    If you are looking for an excellent file undelete product then I would recommend File Restore Professional. It will recover all types of files from all types of Windows media. This includes PCs, iPods, cameras, video players. What is very cool is that you can even preview your deleted files before you recover them. The most amazing part is that you can even listen to your deleted music files and view your deleted videos before you purchase the software. I highly recommend it. You can find out more/download File Restore Professional from any of these:

    http://www.pcrecovery.com
    http://www.photo-recovery.com
    http://www.iPod-recovery.com
    http://www.video-recovery.com

  9. Jimmy Read Reply

    Many times while opressing the Shift + Delete button, the photos are automatically deleted from the hard drive of the computer without getting stored in the recycle bin. If you have deleted the photos, the photos will be there in the Recycle Bin from where it can be recovered easily but in this case, it becomes difficult to recover the photos manually.

    Photo Recovery is a very good application tool that can easily recover all the deleted photos from any kind of memory card of popular digital cameras like Sony, Nikon etc.

    Apart from performing Memory Card Recovery from memory cards like SD, XD, MMC etc, the software also repairs your damaged JPG and JPEG images as well.

  10. Jimmy Ray Jit Reply

    often iPod users abnormally lose his/her songs from the iPod or either iPod unable to play the any video. To overcome this issue, many tools are available but iPod Recovery is best one.

    iPod Data Recovery software tool strongly scan whole drive of the iPod and find all those files which are in recoverable mode. So if you have such an issue, iPod Recovery will certainly give you full pleasure of enjoy once again.

  11. babu Reply

    hi what i have done is memory in harddisk was less so what ever the data was with me in pendrive i tried to cut and paste it on recyclebin but after words their was nothing in recycle bin nor pendrive so where is the data
    i hope you understand what i want to tell

  12. josephkendrick Reply

    Hey dnt wrry it is possible to recover lost data.Deleteing the files or data only deletes the reference to them.The files are still on the hard drive until they are overwritten.There are programs or softwares that will find these deleted data .Auslogics,file recovery,Advanced disc recovery are the type of application which are used to recover lost data.I hav used one “Advanced Disk Recovery”.It can also recover data from formatted hard disc.u can also try this.. Best wishes!!!

    http://www.systweak.com/adr/download/

  13. Mark Austin Reply

    When a file is deleted from your computer, its contents aren’t immediately destroyed. Windows simply marks the hard drive space as being available for use by changing one character in the file table. If you manage to start an undelete process before Windows overwrites that part of hard disk with new files. You can set that flag back to “on” and get your file. As I know, you can download d following software
    http://www.retrievedeletedfiles.net

  14. adrian Reply

    Awful article, u recommend a product which costs $40 when others do the same for free, e.g recuva

  15. Mark J Reply

    @ Adrian:

    If you read the article carefully, you’ll see that Leo isn’t recommending any for pay utilities. He clearly said to Google for a good free utility. Recuva is a fine program for that. What you saw was an ad generated by Google ads which causes ads to appear related to the topic of the page.

  16. My Name is Mike Reply

    Ijust deleted a photo of my friend that he really liked by mistake, i am going to try and recover it now, thanks.

  17. Caitie Reply

    RECUVA worked beautifully. I deleted an entire hard drive. I am not at all computer savy – heance the initial deletion – and it was very easy.
    Thanks for the tips

  18. bob D. Reply

    Leo already told you the first place to look, the second, however, is in the “trash”
    when i ask for ‘inbox’ it comes up as a menu, the last of that is “”traxh”, where
    windows throws stuff without your command…… thus if found there in ‘trash’
    all you have to do is click and it opens then you can command whatever
    turns you on ….

Leave a reply:

Before commenting please:

  • Read the article. Seriously. You'd be shocked at how many people make comments that prove they didn't.
  • Comment only on the article. If you have a new, unrelated question start with the search box at the top of the page.
  • Don't post personal information. Email addresses, phone numbers and such will be removed.

VERY IMPORTANT: because of a rise an comment spam that's making it through our filters any comments that do not add to the discussion - typically off topic or content-free comments - run a very high risk of being flagged as spam and removed.

If you have a new question unrelated to the article above, ask it on the Ask Leo! ask-a-question page.