Re: CopyFile Object Required Error

From: Kirk (Kirk_at_discussions.microsoft.com)
Date: 09/20/04


Date: Mon, 20 Sep 2004 11:47:04 -0700

Thanks for the response. I still received the same error. On top of that, I
want to do this client side.

Kirk

"McKirahan" wrote:

> "Kirk" <Kirk@discussions.microsoft.com> wrote in message
> news:66322319-74F1-4CE7-97D4-038F513428F5@microsoft.com...
> > I have a web page where I want to allow the user to copy a file to a new
> > location.
> >
> > I have the following code in a ASP page:
> > <script language="vbscript">
> > Function PlanCopy(WPA,PlanLoc)
> > Dim strRepLoc, fso
> > On Error Resume Next
> > strRepLoc = "\<server location and path to where file is to be copied>\"
> > strRepLoc = strRepLoc & WPA & "\"
> >
> > Set fso = CreateObject("Scripting.FileSystemObject")
> > fso.copyfile PlanLoc,strRepLoc
> >
> > If err.number <> 0 then
> > msgbox Err.number & vbCrLf & err.Description
> > exit function
> > end if
> >
> > Set fso = Nothing
> > Set f = Nothing
> > msgbox "Your file: " & vbCrLf & PlanLoc & vbCrLf & " has been copied to: "
> &
> > vbcrlf & strRepLoc,vbOKOnly
> > end function
> > </script>
> >
> > Wherever this is executed, I receive a 424 Object Required error and I
> can't
> > seem to figure out why that is.
> >
> > Anyone have any ideas? Am I missing something?
> >
> > Any help would be appeciated.
> >
> > Kirk
>
> Try Server.CreateObject()
>
>
>



Relevant Pages

  • Re: A Martial Arts Self Defense Question and Answer?
    ... Obviously a response one expect of a first grader. ... with many, many, flaws as we have pointed out to you. ... Kirk is not a toady and he certainly would have pointed out the flaw in ... someone is not equally as likely to shoot you no matter what ...
    (rec.martial-arts)
  • Re: Ray Comfort & Kirk Groaning Pains Cameron to debate atheists
    ... real knowledge on the part of the atheist team. ... where kirk and ray were exposed as obvious liars or frauds, ... their slackjawed and without a response. ... (but not the responses to those lies), ...
    (talk.origins)
  • Re: Bowing
    ... Kirk, if what you said had nothing to do with my post, why did you ... post a response? ... Because I was replying to *Scary*. ... "I think that bill Clinton was the most corrupt and dishonest President we have ever suffered through in this country during my lifetime. ...
    (rec.martial-arts)
  • Re: Ray Comfort & Kirk Groaning Pains Cameron to debate atheists
    ... where kirk and ray were exposed as obvious liars or frauds, ... their slackjawed and without a response. ... (but not the responses to those lies), ... was a faked fossil, but not by actual geologists. ...
    (talk.origins)
  • Re: CopyFile Object Required Error
    ... Client side, the FSO is unsafe for scripting. ... debug settings must be hiding this 'error' so that it appears to be that the ... "Kirk" wrote: ...
    (microsoft.public.scripting.vbscript)