recover deleted files

Archived posts from this Category

How to Recover Deleted Files using PhotoRec

Posted by on 29 May 2012 | Tagged as: recover deleted files

In this guide we are going to discuss how to recover deleted files using PhotoRec. Please be forewarned that this is a comprehensive guide designed to be both: easy to follow and effective. It is not the shortest guide out there; however, if you follow it carefully there is a fairly good chance that you will be able to recover your deleted files successfully.

PhotoRec

PhotoRec logoFor those who don’t know, PhotoRec is an open source data recovery program created by CGSecurity and is the companion program to TestDisk (a comprehensive software package which can recover deleted files, recover lost partitions, fix non-bootable hard drives … etc.). Although it sounds as if PhotoRec specializes in digital photo recovery, in actuality, it is capable of recovering a vast array of deleted file types.

PhotoRec Strengths

  • PhotoRec is 100% free : PhotoRec is an open source program and is distributed under the GNU General Public License.  What this means is that it is completely free for both individuals as well as businesses.
  • PhotoRec is effective at recovering deleted files: We here at Seymour Computer Repair have not used PhotoRec a great deal; nonetheless, we have heard great things about its effectiveness.
  • PhotoRec is portable:  Some data recovery software must be installed on your computer before you can use it. This is fine if you are attempting to recover deleted files from an SD card, USB key, external hard drive, or CD/DVD. However, this is a horrible idea if you are attempting to recover deletes files from your recycle bin or local hard drive (we discuss this issue below)! Luckily, PhotoRec doesn’t need to be installed on your computer in order to be used which gives you greater freedom in the recovery process.

PhotoRec Weaknesses

  • PhotoRec doesn’t have a GUI (Graphical User Interface): Most data recovery programs, whether free or commercial, have a graphical user interface; users interact with these programs through windows, images, buttons, check boxes … etc. Unfortunately, PhotoRec is text based; all you will see is a bunch of white text on a black background, furthermore, you will interact with PhotoRec solely through the keyboard. Thank goodness for our step-by-step guide :]
  • PhotoRec will not preserve file names: PhotoRec attempts to recover deleted files without the use of your file system. This means that (1) recovered file names and original file names likely won’t match, and therefore (2) you will have to dig through the recovered files to find what you are looking for.
  • PhotoRec takes a while to recover deleted files: Compared to other data recovery programs, PhotoRec tends to be a bit slow. Truthfully, though, wouldn’t you rather recover your deleted files slowly rather than not at all :]

A Few Warnings about Recovering Deleted File

Before we describe the actual process of how to recover deleted files using PhotoRec we want to provide a few warnings. Please read these warnings carefully.

  • Attempt to recover your files as soon as possible: The sooner you realize that files have been accidentally deleted, the greater the likelihood that you will be able to recover them!
  • Don’t continue to use a device after accidentally deleting files from it: If you accidentally delete files from a device (local hard drive, SD card, USB, external hard drive, CD,DVD…) then stop using it immediately!
  • Don’t install PhotoRec onto the device where the deleted files reside: Installing data recovery software onto a device where deleted files reside is a bad idea! As an example: if your deleted files are on a USB key then don’t install PhotoRec onto that USB key.
  • Don’t recover deleted files to the same device: Recovering deleted files onto the same device they came from is a bad idea! As an example: if your deleted files are on a USB key then don’t recover these files onto the same USB key.

If you wish to know more about any of this information then please take a look through our article: Deleted File Recovery: Do’s and Don’ts. It discusses a number of important concepts which highlight the ways in which deleted files can be lost permanently (something no one wants).

For computer novices:  Don’t worry excessively! As long as you follow along closely there is minimal chance anything will go wrong!

 

Where are your Deleted Files?

The first thing you have to do is decide where the deleted files you wish to recover are located as this will help determine which section of our guide you will follow. The most common locations for deleted files are:

  • In your recycle bin
  • On an SD card
  • On a USB key
  • On an external hard drive
  • On a CD or DVD
  • Somewhere else on your local hard drive (C:)

 

Choose the Appropriate Guide

Option 1: Read How to Recover Deleted Files from the Recycle Bin or Local Hard Drive – Unsafe Method if:

  • Your deleted files are located in the recycle bin or on your local hard drive (C: drive).
  • You want a guide which is unsafe (some chance of permanent file loss) but faster.

Option 2: Read How to Recover Deleted Files from the Recycle Bin or Local Hard Drive – Safe Method if:

  • Your deleted files are located in the recycle bin or on your local hard drive (C: drive).
  • You want a guide which is safe (no chance of permanent file loss) but slower.

Option 3: Read How to Recover Deleted Files from an SD card, USB, External Hard Drive, or CD/DVD if:

  • Your deleted files are located on an SD card, USB key, external hard drive, CD, or DVD.
  • You want a guide which is safe (no chance of permanent file loss).

 

How to Recover Deleted Files from the Recycle Bin or Local Hard Drive – Unsafe Method

This particular guide assumes that you are attempting to recover a deleted file from the recycle bin or from somewhere on your local hard drive (C: drive). It is important to note that this guide is unsafe since it requires you to work with the computer where the deleted files reside; this creates a situation whereby deleted files can, potentially, become permanently lost! If your data is absolutely critical then we recommend that you read How to Recover Deleted Files from the Recycle Bin or Local Hard Drive – Safe Method instead. If some risk is satisfactory then proceed…

What you will need:

  • A USB key
  • An external hard drive
  • Access to the computer where the deleted files do reside (we will call this PC-DEL henceforth)
  • Access to any working computer where the deleted files do not reside (we will call this PC-OTH henceforth)

1) Download PhotoRec onto PC-OTH

1-1) Log onto PC-OTH. Just as a reminder: PC-OTH refers to any working computer where the deleted files do not reside.

1-2) Open up a web browser (Firefox, IE, Google Chrome …).

PhotoRec download page

1-3) Head over to the PhotoRec website and download PhotoRec. You can access the download page for PhotoRec here; just make sure to download the latest normal version as opposed to the latest beta version (look for the section which is not labelled “Beta”).

2) Extract PhotoRec on PC-OTH

You might have noticed that PhotoRec is in fact a compressed/zipped file. In order to make use of it we need to uncompress/unzip it. In order to do that:

PhotoRec compressed

2-1) Right-click on the zipped file which you downloaded in step 1-3.

2-2) Select Extract All…

2-3) Click on the Browse button, click on Desktop (because we want to save everything to the desktop), and click the Ok button.

2-4) Click Extract

2-5) At this point you should see a new folder on your desktop; inside it should be a number of files including photorec_win.exe. Rename this folder: PhotoRec Program Folder.

3) Put PhotoRec onto your USB key

PhotoRec onto usb

3-1) Take your USB key and plug it into PC-OTH.

3-2) Drag the folder, which you just named PhotoRec Program Folder in step 2-5, onto the USB key.

3-3) Take your USB key out of PC-OTH.

4) Connect your USB key and External Hard Drive to PC-DEL

4-1) Take your USB key and plug it into PC-DEL. Just as a reminder: PC-DEL refers to the computer where the deleted files do reside.

4-2) Take your external hard drive, plug it into PC-DEL, and turn it on.

Create recovered deleted files folder

4-3) Once the external hard drive has loaded, open it and create a folder on it; this folder will hold our recovered files so we will name it: Recovered Deleted Files Folder.

5) Open PhotoRec

PhotoRec folder contents

5-1) Open up your USB key, then open up the folder named PhotoRec Program Folder, then finally, double click on photorec_win.exe.

6) File Location Selection

select deleted file device

6-1) Select your local hard drive using the up and down arrow keys on your keyboard. If you are uncertain which device is your local hard drive then follow this simple procedure:

  1. Within the Windows environment open up your Computer.
  2. Right click on the Local Disk (C:) and select Properties.
  3. Look at the Capacity of the Local Disk (C:). Write it down on a piece of paper if need be!
  4. Come back to the PhotoRec window.
  5. Look at the Capacity of each device displayed within PhotoRec. Select the device whose Capacity equals (or is very close to) the Capacity found in step 3. Just as a reminder:  1 GB = 1000 MB = 1,000,000,000 bytes.

6-2) Once the local hard drive has been selected hit the Enter key.

7) Partition Selection

7-1) Select the partition where the deleted files reside using the up and down arrow keys on your keyboard. Generally, you don’t have to worry about this step as the partition is automatically selected. Therefore, simply head down to step 7-2.

7-2) Hit the Enter key.

8) File System Selection

deleted file file system selection

8-1) Select the file system of your local hard drive using the up and down arrow keys on your keyboard. Generally, you don’t have to worry about this step as the file system is automatically selected. If you do need to choose a file system and are uncertain which one to choose then follow this simple procedure:

  1. Within the Windows environment open up your Computer.
  2. Right click on the Local Disk (C:) and select Properties.
  3. Look at the File system of the Local Disk (C:). Write it down on a piece of paper if need be!
  4. Come back to the PhotoRec window.
  5. If the file system  found in step 3 was FAT, FAT 32, or, NTFS then select Other. If the file system found in step 3 began with ext then select ext2/ext3. Nearly all local hard drives are FAT 32 or NTFS; therefore, if you are uncertain simply select Other!

8-2) Once the file system of the local disk has been selected hit the Enter key.

9) Analyze Unallocated Space

analyze unallocated space

9-1) Select the option labeled Free using the up and down arrow keys on the keyboard. This tells PhotoRec that we only want to look for deleted files!

9-2) Hit the Enter key.

10) Recovering Files to your External Hard Drive

This is an extremely important step – Please follow along carefully! At this stage we want to make sure that the recovered files will be saved to your external hard drive (we do not want the recovered files saved to PC-DEL: the computer where the deleted files reside).

Assuming you followed all of the previous steps correctly, PhotoRec (by default) will want to save your recovered files to the PhotoRec Program Folder located on your USB key. What we actually want is to save our recovered files to the folder named Recovered Deleted Files Folder which we created on our external hard drive (in step 4-3). Therefore, perform the following steps …

file recovery step 1

10-1)  Hit the left arrow key on your keyboard. This should move you up one level in the directory and allow you to view what is on your USB key.

file recovery step 2

10-2) Hit the left arrow key on your keyboard again. This should move you up one more level in the directory and allow you to see all of the devices connected to PC-DEL.

file recovery step 3

10-3)  Select your external hard drive using the up and down arrow keys on your keyboard. If you don’t know which device corresponds with your external hard driven then follow this simple procedure:

  1. Within the Windows environment open up your Computer.
  2. Look for your external hard drive and note the letter (C, D, F, G … etc.) to the right of its name.
  3. Come back to the PhotoRec window.
  4. Select the device with the letter found in step 2.

10-4) Once the external hard drive has been selected hit the Enter key..

file recovery step 4

10-5)  Select the folder named Recovered Deleted Files Folder using the up and down arrow keys on your keyboard.

10-6) Hit the Enter key. This takes us inside the folder named Recovered Deleted Files Folder!

file recovery step 3b

10-7) Click the letter C on your keyboard to start the recovery process.

deleted file recovery in progress

10-8) Wait as PhotoRec attempts to recover your deleted files. Please remember that this may take a while!

10-9) Once PhotoRec has finished recovering your deleted files you can close it by clicking on the red X in the top right corner.

11) Surveying the Deleted Files

recovery process complete

11-1) Within the Windows environment, open up the folder named Recovered Deleted Files Folder which should be located on your external hard drive.

recovered files folder

11-2) Open the folder named recup_dir – this folder was automatically created by PhotoRec. If you happen to have a bunch of recup_dir folders simply open the one with the largest number appended to it.

11-3) Search for your deleted files. As mentioned previously, PhotoRec does not preserve file names; therefore, you are going to need to do a bit of digging (opening up files to see their contents).  There are 2 ways to make your search a little easier:

  • Organize and search through the files by type. For example, if you are looking for a JPEG image then only look at the files labeled JPEG. If you are looking for a Microsoft Word Document then only look at the files labeled DOC/DOCX.
  • Organize and search through the files by date modified. If you know that the file you accidentally deleted was created and modified today, then only look at files where “date modified” has today’s date.

12) Done

If you were able to recover your deleted files GREAT!

If you were unable to recover your deleted files then you have several choices:

  • Try to recover your deleted files with a different data recovery program (other than PhotoRec).
  • Take your computer to a compute repair technician and let them have a look.
  • Take your computer to a data recovery specialist; these individuals have specialized data recovery facilities and can oftentimes recover hard to find deleted files (for a sometimes hefty price).
  • Move on and forget about recovering your deleted files.

 

How to Recover Deleted Files from the Recycle Bin or Local Hard Drive – Safe Method

This particular guide assumes that you are attempting to recover a deleted file from the recycle bin or from somewhere on your local hard drive (C: drive). It is important to note that this guide is safe; your deleted files can not be permanently lost by following it! This is because you are going to be recovering from your local hard drive as if it was a USB key, making sure that no new files have a chance to permanently overwrite your deleted files.

What you will need:

  • An appropriate hard drive to USB adapter
  • Access to the computer where the deleted files do reside
  • Access to any working computer where the deleted files do not reside

1) Convert your Local Hard Drive to a USB

1-1) Convert the local hard drive, where the deleted files do reside, into a USB and connect it to a working computer where the deleted files do not reside. In order to do so read our article: how to convert a hard drive to a USB.

2) Recover your Deleted Files from the USB

2-1) Follow the sub-guide: How to Recover Deleted Files from an SD card, USB, External Hard Drive, or CD/DVD as if you were recovering deleted files from a normal USB (think of the local hard drive, which you converted to a USB in step 1, as a normal USB). Note that step 1 of the sub-guide is redundant as you have likely already attached the local hard drive (now USB) to a working computer.

3) Put your Local Hard Drive Back

3-1) Put your local hard drive, which you converted to a USB in step 1, back into the computer from where it originally came from.

 

How to Recover Deleted Files from an SD card, USB, External Hard Drive, or CD/DVD

This particular guide assumes that you are attempting to recover a deleted file from an SD card, USB key, external hard drive, or CD/DVD. It is important to note that this guide is safe; your deleted files can not be permanently lost by following it!

What you will need:

  • Access to the device (SD card, USB, external hard drive, CD, DVD) where the deleted files do reside.
  • Access to any working computer where the deleted files do not reside (we will call this PC-REC henceforth).
  • A memory card reader only if you are attempting to recover deleted files from an SD card and your computer doesn’t come with a built in memory card reader.

1) Attach the Device with the Deleted Files to PC-REC

1-1) Attach the device where your deleted files do reside to PC-REC. Just as a reminder: PC-REC refers to any working computer where the deleted files do not reside.

  • If you wish to recover deleted files from an SD card: Plug the SD card into PC-REC’s memory card reader. If PC-REC does not come with a memory card reader then plug the SD card into an external memory card reader and then plug the external memory card reader into PC-REC.
  • If you wish to recover deleted files from a USB: Plug the USB into PC-REC.
  • If you wish to recover deleted files from an external hard drive: Plug the external hard drive into PC-REC and make sure that its power is turned on.
  • If you wish to recover deleted files from a CD or DVD: Insert the CD or DVD into PC-REC’s CD/DVD drive.

2) Create a Recovery Folder on PC-REC

recovered deleted files folder

2-1) Log onto PC-REC and create a new folder on the desktop named Recovered Deleted Files Folder. Initially this folder will be empty; however, we will fill it with recovered files shortly.

3) Download PhotoRec

3-1) Open up a web browser (Firefox, IE, Google Chrome …).

PhotoRec download page

3-2) Head over to the PhotoRec website and download PhotoRec. You can access the download page for PhotoRec here; just make sure to download the latest normal version as opposed to the latest beta version (look for the section which is not labelled “Beta”).

4) Extract PhotoRec

You might have noticed that PhotoRec is in fact a compressed/zipped file. In order to make use of it we need to uncompress/unzip it. In order to do that:

PhotoRec compressed

4-1) Right-click on the zipped file which you downloaded in step 3-2.

4-2) Select Extract All…

4-3) Click on the Browse button, click on Desktop (because we want to save everything to the desktop), and click the Ok button.

4-4) Click Extract

4-5) At this point you should see a new folder on your desktop; inside it should be a number of files including photorec_win.exe. Rename this folder: PhotoRec Program Folder.

5) Open PhotoRec

PhotoRec folder contents

5-1) Open up the folder you created in step 4-5, named PhotoRec Program Folder, and double click on photorec_win.exe.

6) File Location Selection

select recover device

6-1) Select the device where the deleted files reside using the up and down arrow keys on your keyboard. If you are uncertain which device you should select follow this simple procedure:

  1. Within the Windows environment open up your Computer.
  2. Right click on the device where the deleted files reside and select Properties.
  3. Look at the Capacity of the device. Write it down on a piece of paper if need be!
  4. Come back to the PhotoRec window.
  5. Look at the Capacity of each device displayed within PhotoRec. Select the device whose Capacity equals (or is very close to) the Capacity found in step 3. Just as a reminder:  1 GB = 1000 MB = 1,000,000,000 bytes.

6-2) Once the device, where the deleted files reside, has been selected hit the Enter key.

7) Partition Selection

selected recover partition

7-1) Select the partition where the deleted files reside using the up and down arrow keys on your keyboard. Generally, you don’t have to worry about this step as the partition is automatically selected. If you do need to choose a partition and are uncertain which one to choose then follow this simple procedure:

  1. Within the Windows environment open up your Computer.
  2. Right click on the device where the deleted files reside and select Properties.
  3. Look at the name of the device. Write it down on a piece of paper if need be!
  4. Come back to the PhotoRec window.
  5. Look at the name of each partition displayed within PhotoRec. Select the partition whose name matches (or is very close to) the name found in step 3.

7-2) Once the partition, where the deleted files reside, has been selected hit the Enter key.

8) File System Selection

select file system

8-1) Select the file system of the device where the deleted files reside using the up and down arrow keys on your keyboard. Generally, you don’t have to worry about this step as the file system is automatically selected. If you do need to choose a file system and are uncertain which one to choose then follow this simple procedure:

  1. Within the Windows environment open up your Computer.
  2. Right click on the device where the deleted files reside and select Properties.
  3. Look at the File system of the device. Write it down on a piece of paper if need be!
  4. Come back to the PhotoRec window.
  5. If the file system  found in step 3 was FAT, FAT 32, or, NTFS then select Other. If the file system found in step 3 began with ext then select ext2/ext3. Nearly all normal devices are FAT 32 or NTFS; therefore, if you are uncertain simply select Other!

8-2) Once the file system of the device, where the deleted files reside, has been selected hit the Enter key.

9) Analyze Unallocated Space

scan unallocated space

9-1) Select the option labeled Free using the up and down arrow keys on the keyboard. This tells PhotoRec that we only want to look for deleted files!

9-2) Hit the Enter key.

10) Recovering Files to PC-REC

This is an extremely important step – Please follow along carefully! At this stage we want to make sure that the recovered files will be saved to PC-REC (we do not want the recovered files saved to the device where the deleted files do reside).

Assuming you followed all of the previous steps correctly, PhotoRec (by default) will want to save your recovered files to the PhotoRec Program Folder which is located on the Desktop. What we actually want is to save our recovered files to the folder named: Recovered Deleted Files Folder which we created in step 2-1. Therefore, perform the following steps …

file recovery step 1b

10-1)  Hit the left arrow key on your keyboard. This should move you up one level in the directory and allow you to view what is on your desktop.

file recovery step 2b

10-2)  Select the folder named Recovered Deleted Files Folder using the up and down arrow keys on your keyboard.

10-3) Hit the Enter key. This takes us inside the folder named Recovered Deleted Files Folder!

file recovery step 3b

10-4) Click the letter C on your keyboard to start the recovery process.

file recovery step 4b

10-5) Wait as PhotoRec attempts to recover your deleted files. Please remember that this may take a while!

10-6) Once PhotoRec has finished recovering your deleted files you can close it by clicking on the red X in the top right corner.

11) Surveying the Deleted Files

recover process complete

11-1) Within the Windows environment, Open up the folder named Recovered Deleted Files Folder which should be located on your Desktop.

recovered files folder

11-2) Open the folder named recup_dir – this folder was automatically created by PhotoRec. If you happen to have a bunch of recup_dir folders simply open the one with the largest number appended to it.

11-3) Search for your deleted files. As mentioned previously, PhotoRec does not preserve file names; therefore, you are going to need to do a bit of digging (opening up files to see their contents).  There are 2 ways to make your search a little easier:

  • Organize and search through the files by type. For example, if you are looking for a JPEG image then only look at the files labeled JPEG. If you are looking for a Microsoft Word Document then only look at the files labeled DOC/DOCX.
  • Organize and search through the files by date modified. If you know that the file you accidentally deleted was created and modified today, then only look at files where “date modified” has today’s date.

12) Done

If you were able to recover your deleted files GREAT!

If you were unable to recover your deleted files then you have several choices:

  • Try to recover your deleted files with a different data recovery program (other than PhotoRec).
  • Take your computer to a compute repair technician and let them have a look.
  • Take your computer to a data recovery specialist; these individuals have specialized data recovery facilities and can oftentimes recover hard to find deleted files (for a sometimes hefty price).
  • Move on and forget about recovering your deleted files.

Summary

By now you have either recovered your deleted files using PhotoRec or you were unsuccessful doing so.

If PhotoRec was able to recover your deleted files then you are done. The only thing we can recommend is that, in the future, you always make sure to back up your files whether they are on an SD card, USB key, external hard drive, CD, DVD, or local hard drive. Having files in a number of locations is extremely wise and will prevent the need for worrisome data recovery.

If PhotoRec was unable to recover your deleted files then you have a number of options which we touched upon above. As a quick refresher, you can either:

  • Attempt to recover your deleted files using a different program: we recommend that you look at Recuva, MiniTool Power Data Recovery, and R-Undelete
  • Take your computer to a computer repair technician. Computer repair technicians can sometimes find alternative methods to retrieve your deleted files, although often they will use the types of programs we are talking about here.
  • Take your computer to a data recovery specialist. Data recovery specialists focus on 1 task: data recovery. They generally have advanced recovery facilities and are able to recover files which others, computer users and repair people, can not. The one issues with data recovery specialists is that they can be a tad expensive.
  • Move on and forget about your deleted files. If you are only losing a few hours of work then you should ask yourself: is it really worth all of this time and effort? If, on the other hand, you are losing weeks or months of work then it is likely well worth your time and effort – in such a situation go with one of the alternatives listed above!

Hopefully this comprehensive article, detailing how to recover deleted files using PhotoRec, has been useful. If you have any questions then feel free to email us – Seymour Computer Repair – or leave a comment. Furthermore, if you need to recover deleted files, we just might be able to help!

Next Page »