Placing the file names from the directory and from the posts into arrays and comparing them keeps the queries down to only 2 per deletion run. Otherwise it's 1 query per file in the directory. I have a limit of 50 file unlinks (configurable) per updating to limit the steady stream of unlinks. (one disk seek/access per unlink so if he has 2000 files to delete I don't think we want to send 2000 unlinks to the system) LoL
It's a simple script. I have it almost finished.

If you want to check user status then that will take an aditional query per run making it 3 total.

I hadn't really planned on making it look nice but perhaps this may be another utility that could be placed into the admin section?