"Audit files" module
I posted a query last night (here) asking if there was such a thing as an "audit" module to check uploaded files on a Drupal site. I got no responses and I fancied a project, so I have written one!
This started because I discovered my files folder contained hundreds (630 to be precise!) copies of a jpeg generated by the image module (no, I don't know why...). What I wanted was a way to find out what files were in my files folder that don't have an entry in the files table. Then I thought I would like the reverse query - check to make sure that everything in the files table has a corresponding real file!
When I audited my site with the module I found several hundred stray image files, and also six broken nodes that were missing their related file.
The module adds a new option to the Administer > Logs menu called Audit files (it drops it to the bottom of the list along with status). You can run two reports - Audit for files not in the database, and audit for files not on the server.
In the case of the first it produces a list (single page) and you can check files that you then want to delete (Remember to back up if in doubt!).
In the case of the second you get links to the related node so that you can investigate what is wrong.
The reports are generated on a single page, rather than with a pager, because (a) I was hoping there wouldn't be too many, and (b) I wanted to be able to choose lots of files in one go! I also purposely didn't include the "check all" button as that seemed a little dangerous.
As a precaution if you DO want to delete files you also have to change a drop box from "Do nothing" to "Delete checked files" so you can't accidentally click the button and trigger the delete. You do get a confirmation page as well!
I never managed to get myself a CVS account on here so I've put the file available as a zip download from my site if anyone else wants to try it out.

that sounds interesting.
that sounds interesting. what are the datestamps on those files? i.e. are they all recent? after you upgraded to 5?