Copy file fails with Permission Denied
Posted on 2000-04-19
I am trying to copy a recently uploaded file from one directory to another.
This is the code:
Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd)&"fpdb\"&filename)
For i = 1 to LenB(value)
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile server.mappath("fpdb\"&filename), server.mappath("uploads\"&filename), True
Set FSO = Nothing
And this is what I get:
Microsoft VBScript runtime error '800a0046'
/outputFile.asp, line 52
Line 52 is the FSO.CopyFile line.