Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

How can i delete my thumbnail created by Smart...

Posted 15 Apr 2005 23:02:58
1
has voted
15 Apr 2005 23:02:58 Patrice Bois posted:
Smart Image processor...

this is my code that i use to delete the original image file, i wish at the same time delete my thumbnail image with the same name of file with a suffix : _small

this is my code, how can i modify this :

<%
Response.Buffer=1
Dim strID,rsDel,File,sql
strID=Request("checkbox"
if strID <> "" then
Set File = CreateObject("Scripting.FileSystemObject"
Set rsDel= Server.CreateObject("ADODB.Recordset"
rsDel.ActiveConnection = MM_Module_Rose_STRING
sql="SELECT * FROM informations WHERE info_id IN "
sql=sql &"(" & strID & ""
rsDel.Source = sql
rsDel.LockType = 3
rsDel.open()
%>
<%
Do While rsDel.EOF=False
dim TempPath
TempPath=(Server.Mappath(("../../_images/imagesBD/info" &"/" & rsDel("image"))
rsDel.Delete
if File.FileExists(TempPath)=true then
File.DeleteFile(TempPath)
rsDel.MoveNext
Else
rsDel.MoveNext
End if
Loop
rsDel.Close
Set File=Nothing
Set rsDel=Nothing
else Response.redirect("affichage.asp"
end if
Response.Redirect "affichage.asp"
%>

thanks

Reply to this topic