I need a script that will compare files in an image directory and compare them to an Access DB table. If there is no record in the db for the image file then delete the file. **It would be nice to have a web page that would show the orphaned files and the prompt to delete them.
**
This maybe tricky, the DB name is [login to view URL] & it has a table in it called RealtyADS with a field named AD_ID. This is where the main record is. The image names are kept in a table called AD_IMAGES also with a field called AD_ID. This refers back to the entry in AD_ID under RealtyADS to match the image with the correct record.
I'm not the original programmer for this site or I would have coded it so when the record is deleted so is the image file. On a scale of 1-10 I'm probably a 7 in ASP coding but this has me stumped. I can list the files in the directory and even delete them from an ASP page but with the DB I can't get the two to work the way I want...
I would prefer ASP coding over .net since I have and understand somewhat ASP.
I've included a smaller copy of the DB.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
This is running on a Windows 2000 Server with IIS5 and frontpage extension 2002. I have full access to this PC.
I would prefer ASP coding over .net since I have frontpage 2003 & I'm more familiar wiith ASP.