Programs & Utilities
There are a ton of programs out there for data mining and accidental file deletion recovery - you can even recover files from a formatted disk, in most instances. For the most part, there's no reason to pay for a tool to do it for you; we've used open source and free tools with great success, so there's no reason you can't as well.
Photorec / Testdisk
We're going to be using a free command prompt tool called "photorec" (also known as "testdisk") for this guide. I've personally found it to be most effective -- it takes a bit longer, but its results are good.
You can download the utility here: http://www.cgsecurity.org/wiki/TestDisk_Download
Once you've downloaded and extracted the utility, go into the testdisk folder that was created and launch 'photorec_win.exe.' You should see something like this:
Pick the partition or drive that you'd like to recover a file from. You can recover files from a flash device, SD cards (ever delete a photo that you want back?), hard drives, and other media devices. In my case, we see 2x2TB drives, a 640GB drive, and an 8GB flash drive. I'll choose the flash drive for sake of speed.
If your selected device has only one partition, it should look something like this:
If it has multiple partitions, it will be more along these lines:
Choose the partition and continue onward! Next, testdisk will ask you what type of filesystem is on the drive. The previous page should have told you, but if you're not sure, here's the simple rule: NTFS for Windows devices (also FAT, but that's more for legacy devices) or ext2/ext3/ext4 for Linux drives (like Ubuntu).
I'll select "other" for the NTFS option, in this case:
You'll now be asked where to save any recoverable files. It should default you to the directory in which photorec/testdisk reside, but feel free to navigate. If you're unfamiliar with this navigation, selecting the ".." option and pressing enter will climb a level (go to the above directory/folder). In my case, I want to climb to simply J:\RestoredFiles\. I'll select ".." three times, then scroll down to "RestoredFiles," enter it, and press "C." When you find the directory you want to save to, enter the dir (arrow key to it, push enter) and press "C."
Want to save to another drive? Go to the "." option and press the left arrow key. This will take you to the overview of all your drives. Use the right and left arrow keys to bounce around until you find the one you want.
Now you'll see the utility begin scanning! This can take quite a while, so sit tight. You should be able to play games or browse the web while running the program, just be careful not to mess with the hard drive that's being operated on.
When all the files are recovered, you'll see names like "recup_dir.1" and "recup_dir.2" in the selected storage directory. The utility normally can't recover directory names, but it's pretty decent about recovering file names. In some cases, you might see files named "FILE001.DOC," which sort of sucks because you'll have to look through all of them for what you want, but at least they're there. You can always run a search on the directory for key words that you know are in the file.
Hopefully that helped in your situation! If you didn't find what you're looking for or got stuck, leave a comment below or post on our forums and we'll be happy to help.