Thatguy2001au
10-20-2002, 06:02 AM
Hi
I was hoping someone could help me with something. When a user presses on a certain link in my site, it deletes their record from the database. Now, they also have an image on the server which they uploaded when they added their record. That image is stored in a folder called "images" on the server and only a reference of the name of the file is made in the database. There is no reference of the path yet is know it to "classes\images\"
I am trying to use the fso to delete the file but i always get a "file not found error" if anyone has any ideas at all or could point me in the right direction then that will be much apprecieted. thanks. here is the code below.
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile "class\images\" + (Recordset1.Fields.Item("AD_IMAGE").Value)
Set objFSO = Nothing
I was hoping someone could help me with something. When a user presses on a certain link in my site, it deletes their record from the database. Now, they also have an image on the server which they uploaded when they added their record. That image is stored in a folder called "images" on the server and only a reference of the name of the file is made in the database. There is no reference of the path yet is know it to "classes\images\"
I am trying to use the fso to delete the file but i always get a "file not found error" if anyone has any ideas at all or could point me in the right direction then that will be much apprecieted. thanks. here is the code below.
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile "class\images\" + (Recordset1.Fields.Item("AD_IMAGE").Value)
Set objFSO = Nothing