Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem with MoveFile command in an ASP page

Reply
Thread Tools

Problem with MoveFile command in an ASP page

 
 
RSH
Guest
Posts: n/a
 
      05-11-2006
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MoveFile problem Patrice ASP General 1 01-31-2005 02:37 PM
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net 4 10-23-2003 11:09 AM
RUN/execute a Command-Line command from an ASP page Lucas Cowald ASP .Net Building Controls 1 10-22-2003 04:26 PM
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net Datagrid Control 1 10-22-2003 12:22 PM
RUN/execute a Command-Line command from an ASP page. Lucas Cowald ASP .Net Mobile 0 10-22-2003 11:15 AM



Advertisments