Hi All... I'm trying to delete files from the server and its not working. Can any one help please?
It says the file doesn't exist... where as the file exists...
I did a response.write for my delFile to make sure its there but it doesn't see the file...
Thanks
A.
It says the file doesn't exist... where as the file exists...
I did a response.write for my delFile to make sure its there but it doesn't see the file...
Thanks
A.
Code:
Dim fso
'Dim pathEnd
Dim MyFile
Dim delFile
Set fso = Server.CreateObject("Scripting.FileSystemObject")
FilePath = "C:\Inetpub\[URL unfurl="true"]wwwroot\conferences\upload\"[/URL]
MyFile = rsD.Fields.Item("docFile").Value
delFile= Filepath+MyFile
Response.Write delFile
If(fso.FileExists(FilePath)) Then
fso.DeleteFile(FilePath)
Else
Response.write("File Doesn't Exist")
End If