PDF download Download Article PDF download Download Article

If you've accidentally overwritten an old file or folder with a new one, you may still be able to retrieve the old version. There is free software available for every operating system that you can use to scan and recover deleted files from your hard drive. If you had backups set up through your operating system beforehand, your file may exist in your backup as well.

Method 1
Method 1 of 3:

PhotoRec (Windows, Mac, and Linux)

PDF download Download Article
  1. When you notice that you've accidentally delete or overwritten a file, do not save anything else on that hard drive. Avoid running programs as well. Whenever new data is written to the drive, there's a chance that it could be set to override the data from the old file. Not saving anything increases the chances that you'll be able to recover the file.
  2. This is a powerful free file recovery program. It isn't pretty, but it can do a lot of the same things that expensive file recovery programs do. You can download PhotoRec for free from www.cgsecurity.org as part of the TestDisk utility.
    • PhotoRec is available for Windows, OS X, and Linux.
    • For another Windows file recovery option, check out our steps to use Recuva below.
    • Make sure to do this on another computer to avoid overwriting the file you are trying to recover. You can also download PhotoRec to another drive on your computer, but it's safest to get it on another computer.
    Advertisement
  3. Ideally, you'll want to use a USB drive that is big enough to hold both PhotoRec and any files that you want to recover. This is because recovering the file to its original drive increases the chances that the recovery will write over the original, corrupting it in the process.
    • PhotoRec is only about 5 MB in size, so any size USB drive will be able to hold it.
  4. TestDisk comes packaged in a ZIP (Windows) or BZ2 (Mac) file. Extract the TestDisk folder.
  5. This will allow you to run PhotoRec from the USB drive.
  6. Open the TestDisk folder on the USB drive.
  7. This will launch your Command Prompt or Terminal.
    • You will use the arrow keys up, down, left, and right to navigate and Enter or Return to confirm selections.
  8. The disks are just numbered, so you will need to go off the size of the disk.
    • If your disk has multiple partitions, such as a C: and D: drive on one physical disk, they won't be listed until you select the disk they are on.
  9. By default PhotoRec will try to recover any file that it supports. You can speed up the search by specifying which file types you want to focus on.
    • You can change the file types options in the File Opt menu.
    • While in the File Opt menu, you deselect everything on the list by pressing S. You can then go through the list and enable each filetype you want to search for.
  10. You will need to judge which one is correct based on the size of the partitions. Some partitions may be labeled.
  11. If you are using Linux, select ext2/ext3 . If you are using Windows or OS X, select Other .
  12. Your choice here depends on how the file was lost:
    • Free - Select this option if you manually deleted or copied over your old file.
    • Whole - Select this option if disk failure caused you to lose access to the file.
  13. Make sure that this isn't on the same partition as the files you are trying to recover.
    • Use the .. at the top of the directory list to navigate back to your installed disks. This will allow you to find a location on another partition or USB drive to save the files to.
    • Press C when you've located the directory you want to save the files into.
  14. PhotoRec will begin trying to recover deleted files from the partition you chose. The remaining time will be displayed on the screen, and the number of files recovered will be shown.
    • File recovery can take a really long time, especially if the partition is large and you are searching for a wide variety of file types.
  15. Once the scan is finished, you can check your recovery directory to see the files that were recovered. The filenames will likely be destroyed, so you will need to go through each one to see if the file you need was successfully recovered.
  16. Advertisement
Method 2
Method 2 of 3:

Recuva (Windows)

PDF download Download Article
  1. When you notice that you've accidentally delete or overwritten a file, do not save anything else on that hard drive. Avoid running programs as well. Whenever new data is written to the drive, there's a chance that it could be set to override the data from the old file. Not saving anything increases the chances that you'll be able to recover the file.
  2. Download the installer to another drive on your computer, or on a different computer altogether. Recuva is available for free from www.piriform.com .
  3. This is the drive that you are going to be installing Recuva on to. This will allow you to run Recuva without accidentally overwriting any files on the drive you are recovering files from.
  4. Click Next to proceed.
  5. Advanced to change the installation location. Select either option to proceed.
  6. You will need to create a "Recuva" folder.
  7. Install .
  8. portable.dat . Confirm that you want to change the file extension.
  9. Open the Recuva folder on the USB drive.
  10. This will begin the recovery wizard.
  11. You can search for all files, or you can search for specific types of files.
  12. You can search everywhere on your computer or you can specify certain locations.
  13. Recuva will begin scanning the location you specified for files that match your selection.
  14. After the scan is complete, you will see a list of results. Check the box for each file that you want to recover and then click Recover... .
  15. Make sure that it is not the same partition as the files you are recovering, or you could cause errors with the recovered files.
  16. Advertisement
Method 3
Method 3 of 3:

Recovering Older Versions of a File

PDF download Download Article
  1. Both Windows 7 and Windows 8 have file history backup utilities. These need to have been enabled in order to use them to recover older versions of files. [1]
    • See this guide for detailed information on using File History for Windows 8.
    • This feature can fill up your drive pretty quickly, but you can limit how much space these files take up. [2]
  2. You will need to configure Time Machine to store your backups on an external hard drive beforehand, but you will then have access to all the different versions of that file over time.
    • See this guide for detailed information on using Time Machine.
  3. Advertisement

Expert Q&A

Search
Add New Question
  • Question
    Why is restore previous version not available?
    Stan Kats
    Professional Technologist
    Stan Kats is a Professional Technologist and the COO and Chief Technologist for The STG IT Consulting Group in West Hollywood, California. Stan provides comprehensive technology solutions to businesses through managed IT services, and for individuals through his consumer service business, Stan's Tech Garage. Stan holds a BA in International Relations from The University of Southern California. He began his career working in the Fortune 500 IT world. Stan founded his companies to offer an enterprise-level of expertise for small businesses and individuals.
    Professional Technologist
    Expert Answer
    You have to enable Windows to save older versions of your files. Unfortunately, a lot of people don't have this setting turned on.
  • Question
    Why would the filenames likely be destroyed?
    Community Answer
    The internal bit of the hard drive where the file name was stored has been written over too many times.
  • Question
    I had formatted my laptop before 6 months and lost all the partition with containing its data. With a new partition I had created only one drive, so I want all my previous partition with data. How do I do this?
    Community Answer
    You can't, because it's overwritten. There is no trace of the old files. If you have some kind of backup, you may recover them, but if you don`t you are out of luck.
See more answers
Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      References

      1. Stan Kats. Cybersecurity Expert. Expert Interview. 16 July 2021.
      2. Stan Kats. Cybersecurity Expert. Expert Interview. 16 July 2021.

      About This Article

      Article Summary X

      1. Download PhotoRec from https://www.cgsecurity.org .
      2. Extract the PhotoRec archive to a USB drive.
      3. Run the photorec app.
      4. Select a disk to recover.
      5. Select a file type to search for.
      6. Select the partition, file system, and where to search.
      7. Select a recovery location.
      8. Follow the on-screen instructions to restore.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 828,273 times.

      Reader Success Stories

      • Johan Sander

        Oct 31, 2016

        "PhotoRec was just the solution I needed. It saved me a lot of work by recovering a file I had saved over. PhotoRec ..." more
      Share your story

      Is this article up to date?

      Advertisement