hello all,
I have this simple bit of code that works fine, but if there is a plus sign ( + ) in the file name, it won't delete.
Even more annoying, there's no error.
any idea how to delete a file with plus signs in?
i'm guessing that its turning the command into IO.File.Delete(Trim(strPath & "\" & "something + something.docx"))
file name: "something + something.docx"
thanks in advance.
Dave
I have this simple bit of code that works fine, but if there is a plus sign ( + ) in the file name, it won't delete.
Code:
Dim fn As String = Request("fn")
Try
Dim strPath As String = "F:\wwwfiles\SupportDocuments\" & CID
IO.File.Delete(Trim(strPath & "\" & fn))
Catch ex As Exception
Response.Write(ex.Message)
Response.End()
End Try
any idea how to delete a file with plus signs in?
i'm guessing that its turning the command into IO.File.Delete(Trim(strPath & "\" & "something + something.docx"))
file name: "something + something.docx"
thanks in advance.
Dave