I have undeleted a file but it contains junk. What happened?

When a file is deleted the parts of the drive the file was saved on are marked as free, which means when a new file is created or an existing one increased in size, it is possible that those now free parts of the drive can be used to save the new data. This means parts of the deleted file may be overwritten. When a file is undeleted it will undelete all parts of the drive that the file was using when it was deleted. Some of those parts may currently be used by another file, or at one point in time may have been used by a file that has since been deleted. Because of this you may not get all of the original file back.

There is no way around this issue as the original data has been overwritten with new data. This is why it is critically important that once a file is deleted you should undelete the file as quickly as possible. Even so, in many cases it is still better to retrieve at least some of the file than none of it.