Technology in terms you understand. Sign up for my weekly newsletter, "Confident Computing", for more solutions you can use to make your life easier. Click here.

I Deleted a File by Mistake, Can I Get It Back?

//
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 has used computers for any length of time has been where you are now. I know I have, and on more than one occasion.

The answer to your question is “maybe”. It depends on a lot of things.

Become a Patron of Ask Leo! and go ad-free!

Stop — just stop

First, and this is important, stop using the disk that had the file.

To increase the likelihood that the file can be recovered, stop doing things that write to the disk.

That includes leaving your programs running, since many write to the disk as they exit. It also means not browsing the internet, since the browser writes to disk as you browse.

Recycle Bin

First things first: look in the Recycle Bin.

If you deleted the file using Windows File Explorer (or many of the standard Windows controls), the file might not actually be deleted. Instead, it might just have been moved into the Recycle Bin.

Recycle Bin & Restore

If you find it there, right-click on it and click on Restore to move it back to wherever it was originally. Move it out now, because if the Recycle Bin is emptied, 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 — this is referred to as a “permanent” delete. However, it might still be recoverable.

Undelete

Deletion does not overwrite the data in your file. All it 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 a file don’t disappear until it’s 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 disk after you’ve “permanently” deleted a file could overwrite its contents.

There are many “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 can be recovered.

Remember that I said don’t write to the disk? Search for and download an undelete utility using a different computer entirely, and use a USB thumb drive or other media to take it to the computer experiencing problems. If you can run it from the USB drive directly, that would be ideal since actually installing it would write to the hard disk, something we’re trying hard to avoid.

If you’re lucky and you haven’t written anything to the hard disk since the file was deleted, the undelete utility may 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.

Big (expensive) guns

There is one, last, hope — but it’s expensive, 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 techniques, so you would send your hard drive to a data recovery service.

And you’d write a fairly large check.

There are many factors involved, and it’s not as easy as you might see on TV, but it can, sometimes, be done.

Prevention is so much easier

My ultimate recommendation? Regular backups.

I have saved hours of valuable time by recovering a deleted file from my backups.

There are so many ways a regular backup protects you. Accidental deletion is one more.

Podcast audio

Play

29 comments on “I Deleted a File by Mistake, Can I Get It Back?”

  1. 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. Thank you all for helping me recovering an important document ! I hope it will work ! Thanks again. Sorry for my English… 😉 Bye all

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

  6. 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!!

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

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

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

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

  11. 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/

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

  13. @ 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.

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

  15. One minor correction: Leo wrote “It is sometimes possible, using advanced data recovery techniques, to recover data even after it’s been overwritten.” Nope – that is impossible, see MHDD Podcast #27. Scott answers just that question about 30 minutes in.
    What may be possible, and what Leo may have been referring to is signature scans where a program would looks at all sectors for some character string that was in the lost file; this is the equivalent to the old Norton utilities disk editor for DOS and FAT-formatted disks. It’s a lot harder now with terabyte drives and more complicated disk formatting.

    • The advanced recovery techniques use several tricks to read the tracks with a little radial offset. Repeat using different offsets, perform some advanced data analysis and statistical magics, and, sometimes, you can recover overwritten data. That work because the drive’s heads can fall slightly off the normal track location depending of the direction and distance it had to travel to reach that particular track.
      Another way is to look for the phantom remains of the overwritten files. When you write new data, the previous magnetism from the old data may influence the final magnetization of the media. You need to get the analog reading of the surface to perform this. The drive’s normally can’t give you that and you need to plug the heads into another firmware/hardware set to read the numeric data as an analog stream.
      It’s a long process. It’s a difficult process. It get more complicated because you often need to work with the raw data image. It use some expensive hardware that is also expensive to operate. You also need some highly specialized software that cost a lot. You need special formation to effectively use those. The specialists who know how, and have the tools, demand top $ for the job.
      Even with all this, recovery is not assured, it just often work. When it work, you may not be able to recover all the content of the recovered files.
      If you have an SSD, then, it probably can’t work as there are no physical tracks.

    • Please, READ the article.
      Look into your recycle bin. Recover the files if they are there.
      Use Recuva or some other files recovery utility.
      Some media reader, like iTune, like to reorganize your music collection in the background, without telling you about it.
      Maybe your files are in the wrong location, or have been relocated/reorganized : Use Ctrl+f to search for them. You don’t need the full name, something like “*.mp3 *.aac” will match all MP3 and AAC files on the drive, or even your whole computer if you have several drives/partitions.

  16. The basic problem is files that are deleted without going to the recycle bin. The program Undelete by Condusiv solves this problem, e.g. it stores files that are deleted via the command line.

  17. This is the reason I have a complete copy of My Documents on an external hard drive which includes everything personal. Files such as those related to removed programs I never delete but move to a “pending” file on the desktop in case problems show up so they could be added back in. I would never touch any other files on the computer such as any Windows files, much less delete them. And with Registry keys I export them meaning make an external copy before deleting but I don’t recommend anyone touch the registry unless they have a lot of experience with their computer, meaning they have read a lot of books including the big, fat ones from Microsoft written for technicians.

    As a matter of curiosity, I did want to ask Leo if, in the case he/she writes about, if their only other computer was a Chromebook it would still be possible to download the utility to the USB via such a machine. My inkling is “yes” since I think you could download a program installer but you just can’t run it.

    At any rate good article as always.

    • It’s possibly unrecoverable. That’s why system image backups and daily incremental backups are so important. OneDrive is good for additional backups but can’t be relied upon as a primary backup.

Leave a reply:

Before commenting please:

  • Read the article. Comments indicating you've not read the article will be removed.
  • Comment on the article. New question? Start with search, at the top of the page. Off-topic comments will be removed.
  • No personal information. Email addresses, phone numbers and such will be removed.
  • Add to the discussion. Comments that do not — typically off-topic or content-free comments — will be removed.

All comments containing links will be moderated before publication. Anything that looks the least bit like spam will be removed.

I want comments to be valuable for everyone, including those who come later and take the time to read.