
January 31st, 2012, 10:41 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Location: Budapest
|
|
|
CopyFile not working...
I have a website on a Godaddy shared hosting account. On a page I have this code
Code:
<%
dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
source = Server.mapPath("../images/local-directory/temp.jpg")
destination = Server.mapPath("../images/local-directory/21")
If filesys.FileExists(source) Then
filesys.CopyFile(source, destination)
End If
%>
If open this page I get a Server 500 error. If I remove the filesys.CopyFile from within the If statement and put a redirect instead it works, telling me the file does exist. But not sure the right syntax for the CopyFile
__________________
Today the world, tomorrow the universe...
|