You would need to write a php script to compare the existing attachment files to the entries in the database, and remove the database entries for the missing files. That would leave broken attachments in posts though.
Maybe another thing you could do is to create and image that says "Sorry, attachment is missing" then copy or (file system) link that to each missing file name (you'd probably also need some kind of script to do that for you).
|