<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>对文件夹名称的修改</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
.style1 {
	font-size: 14px;
	font-weight: bold;
	color: #0000FF;
}
.style2 {color: #FF0000}
-->
</style></head>

<body>
<%
if request("post")<>"" then
	fullfoldername=request("name")
	foldepath=left(fullfoldername,instrrev(fullfoldername,"\"))
	set fso=CreateObject("scripting.filesystemobject")
	if fso.folderexists(foldepath&request("editname")) then
		response.Write("<script language=javascript>alert('文件已经存在');location='javascript:history.go(-1)'</script>")
		response.end
	else
		fso.copyfolder fullfoldername,foldepath&request("editname")
		fso.deletefolder fullfoldername
		response.Write("〈<script language=javascript>alert('修改成功')</script>")
	end if
end if
%>
<form action="" method="post"  name="form1">
  <div align="center">
    <input name="post" type="hidden" id="post" value="true">
    <table width="404" height="178" border="1" cellspacing="0" bgcolor="#C6EAF9" bordercolordark="#C6EAF9" bordercolorlight="#FFFFFF">
	      <tr>
        <td height="48" colspan="2" align="right"><div align="center" class="style1">更改文件夹的名称</div></td>
        </tr>
      <tr bgcolor="#FFFFFF">
        <td width="132" align="right">选择源文件的路径：</td>
        <td width="261"><input name="name" type="text" id="name">
        例如：d:\test</td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td align="right">更改的名称：</td>
        <td><input name="editname" type="text" id="editname2">
        例如：test1</td>
      </tr>
      <tr align="center" bgcolor="#FFFFFF">
        <td colspan="2"><input type="submit" name="Submit" value="  修 改  "></td>
      </tr>
    </table>
    <p class="style2">*桌面上的文件不能修改</p>
  </div>
</form>
</body>
</html>
