Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting Images That Are Not In a Database Table

Status
Not open for further replies.

3dColor

Programmer
Jan 10, 2006
240
US
I have an area of my web site that I allow image uploads without signing in. However if I person never activates their listing I would like to flush those images on a daily basis.

How do I query the table of good images and then <cffile action="delete" file="d:\inetpub\example\photos\#x#"> the ones that are not in the table?

Dave
 
You could use <cfdirectory action ="list". Then loop through the list and delete the files that are not in your database.

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top