Sono un centinaio di files, me lo chiedi perché si potrebbe arrivare al timeout dello script?
Avevo abbozzato questo codice che però fa il contrario, cancella quello che c'è nel database:
mi suggeriresti il codice per confrontare i files letti nella cartella a quelli nel database?codice:sql = "select * from cataloghi" set rec = conn.execute(sql) if not rec.eof then do while not rec.eof productID = rec("productID") PercorsoImg1 = rec("Foto1") Dim fs Set fs = Server.CreateObject("Scripting.FileSystemObject") rec.MoveNext IF fs.FileExists (Server.MapPath(PercorsoImg1)) Then fs.DeleteFile server.MapPath(PercorsoImg1),True ELSE response.write("NON ESISTE") response.write("</br>") END IF Loop end if Set fs = nothing


Rispondi quotando