By "path", do you mean directory? If so, you could open all files in that directory, and any that purport to be PDFs (meaning, they have a .pdf extension) but can't be opened by a library like PDFBox or OpenPDF, can be flagged for human inspection (or renamed or whatever).
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop