Seems to me you have a bug No such thing as 47,000 files which went corrupt.
Sure you don't have a virus ?
I once had (ACDSee v4.0) that too many files were loaded in the program, and it couldn't make any more thumbs. I removed my "ImageDB.ddf" and everything was fine again. (but every jpg. must be rebuild.)
do a serious virusscan remove ImageDB.ddf uninstall ACDSee reinstall windows, on top of the previous (and make sure your pics are in a non-system-folder).
But anyhow ... if you burn your images on CDrom ... you can see them again, once your system is full functional again.