After some rest and a closer examination, i realized the
error was in the mappath line, it wasnt including the folder that
held the files. strPhysicalPath = Server.MapPath(filepath) was
wrong so, I added the folder name: strPhysicalPath =
Server.MapPath("EMPLOYEE_FILES/" & filepath) then the file is
deleted. so complete code is:
<%
Dim filepath, strPhysicalPath
filepath = Session("file_del")
strPhysicalPath = Server.MapPath("EMPLOYEE_FILES/" &
filepath)
set filedel = CreateObject("Scripting.FileSystemObject")
filedel.DeleteFile (strPhysicalPath), True
set filedel = nothing
%>