Data Recovery

I recently had a friend that had a flash drive that kept saying it needed to be formatted. He was able to recover everything using this:
http://www.cgsecurity.org/wiki/TestDisk

They have a companion software for pictures.
http://www.cgsecurity.org/wiki/PhotoRec