<!-- #include file="conn.asp" -->
<!-- #include file="md5.asp" -->
<%Call Head()
Call saycardd("备份")

url=usb(request("url"))
turl=usb(request("turl"))
zurl=usb(request("zurl"))
add=usb(request("add"))

Set fs = Server.CreateObject("Scripting.FileSystemObject")
SFile = Server.MapPath("/inc/"&turl&"")
TFile = Server.MapPath("/inc/"&zurl&"")
on Error Resume Next
fs.CopyFile SFile, TFile
If Err.Number = 53 Then
 Response.Write SFile & "文件不存在！"
Elseif Err.Number = 70 Then
 Response.Write TFile & "文件属性为只读！"
Elseif Err.Number = 76 Then
 Response.Write "该文件夹不存在"
Elseif Err.Number <> 0 Then
 Response.Write "未知错误，错误编码：" & Err.Number
 If add<>"" then
 Response.Write "<br/>将"&turl&"备份到/inc/"&zurl
 Else
 Response.Write "<br/>将/inc/"&zurl&"还原到"&zurl
 End if
Else
If add<>"" then
 Response.Write "成功将路径"&turl&"的文件备份到/inc/"&zurl
 Else
  Response.Write "成功将路径/inc/"&turl&"的文件还原到"&zurl
 End if
End If
fs.Close
conn.Close
Response.Write "<br/><a href='"&replace(url,"@@","&amp;")&"'>返回来源页</a>"

Call head1()
%>