Problem with MoveFile command in an ASP page

Discussion in 'ASP .Net' started by RSH, May 11, 2006.

  1. RSH

    RSH Guest

    I have an ASP page that needs to move a file from one directory to another.
    The code is quite simple but I can't seem to get it to work. I keep getting
    a "Download Error: Procedure call or argument is not valid." error when it
    hits the movefile part of the code.

    What am I missing?


    Dim fso = CreateObject("Scripting.FileSystemObject")

    strFile1 = "C:\\Inetpub\\wwwroot\\20060118-QuarterlyReports-05112006.rpt"

    strFile2 =
    "C:\\Inetpub\\wwwroot\\Archive\\20060118-QuarterlyReports-05112006.rpt"

    If fso.fileexists(strFile1) Then

    fso.MoveFile(strFile1, strFile2)

    End If



    Thanks!

    Ron
     
    RSH, May 11, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lucas Cowald
    Replies:
    4
    Views:
    1,078
    Tohid
    Oct 23, 2003
  2. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    251
    Genich
    Oct 22, 2003
  3. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page.

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    217
    Oliver
    Oct 22, 2003
  4. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page.

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    186
    Lucas Cowald
    Oct 22, 2003
  5. Patrice

    MoveFile problem

    Patrice, Jan 31, 2005, in forum: ASP General
    Replies:
    1
    Views:
    202
    Ray Costanzo [MVP]
    Jan 31, 2005
Loading...

Share This Page