R
RSH
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
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