KillFile

Deletes a file, using mapped or unmapped file path

CodeFunctionName
What is this?

Public

Tested

Original Work
Sub KillFile(MappedFile, UnmappedFile)
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
FilePath = ""
If MappedFile > "" And UnmappedFile = "" Then
FilePath = MappedFile
ElseIf MappedFile = "" And UnmappedFile > "" Then
FilePath = Server.MapPath(UnmappedFile)
End If
If FilePath = "" Then Exit Sub
FSO.DeleteFile(FilePath)
Set FSO = nothing
End Sub

MappedFile, UnmappedFile

Views 4,496

Downloads 1,464

CodeID
DB ID