<%
Private Sub FileCopy(byVal source, byVal destination)
Dim objFSO, objToCopy, boolErr, strErrDesc
On Error Resume Next
Set objFSO = Server.CreateObject("scripting.filesystemobject")
if instr( right( source, 4 ), "." ) then
' probably a file
Set objToCopy = objFSO.GetFile(source)
else
' probably a directory or folder
Set objToCopy = objFSO.GetFolder(source)
end if
objToCopy.Copy destination
if Err Then
boolErr = True
strErrDesc = Err.Description
end if
Set objToCopy = Nothing
Set objFSO = Nothing
On Error GoTo 0
if boolErr then Err.Raise 5104, "FileCopy Statement", strErrDesc
End Sub
%>