I have an error coming from a FIleExists call I think. As below, if my file already exists - then I need to overwrite it - but move will not do it, so I delete the exisiting one first - but the error is a pain.
Here it is
Set FSO = Server.CreateObject("Scripting.FileSystemObject"
' Grab the file from the temp folder
Set FILE = FSO.GetFile(Server.MapPath(TEMPLocation))
' Attempt to save to specified Folder - same as original
If Not FSO.FileExists(Server.MapPath(destination)) Then
FILE.Move Server.MapPath(destination)
Else
' If the file is already there, we need to delete it first. This is where the access denied error comes from
Call FSO.DeleteFile(Server.MapPath(destination),true)
FILE.Move Server.MapPath(destination)
fileExists = true
Here it is
Set FSO = Server.CreateObject("Scripting.FileSystemObject"
' Grab the file from the temp folder
Set FILE = FSO.GetFile(Server.MapPath(TEMPLocation))
' Attempt to save to specified Folder - same as original
If Not FSO.FileExists(Server.MapPath(destination)) Then
FILE.Move Server.MapPath(destination)
Else
' If the file is already there, we need to delete it first. This is where the access denied error comes from
Call FSO.DeleteFile(Server.MapPath(destination),true)
FILE.Move Server.MapPath(destination)
fileExists = true