正在阅读:FSO操作示例(给初学者)FSO操作示例(给初学者)

2004-06-04 10:29 出处:CSDN 作者:iuhxq 责任编辑:linjixiong



'文件夹操作函数
function delfolder()
 foldername=request.QueryString("foldername")
 set fso=server.CreateObject("scripting.filesystemobject")
 tempurl=url&"?foldername="&fso.GetParentfoldername(foldername)
 fso.deletefolder(foldername)
 set fso=nothing
 response.Redirect(tempurl)
end function

function savefolder()
 foldername=request.Form("foldername")
 foldername1=request.Form("foldername1")
 set fso=server.CreateObject("scripting.filesystemobject")
 if foldername1="" then
  set f=fso.createfolder(foldername)
 else
  fso.MoveFolder foldername1,foldername
 end if
 tempurl=url&"?foldername="&f
 set fso=nothing
 response.Redirect(tempurl)
end function

function newfolder()
 foldername=request.QueryString("foldername")&"\"
 formfolder foldername,foldername1
end function

function editfolder()
 foldername=request.QueryString("foldername")
 foldername1=request.QueryString("foldername")
 formfolder foldername,foldername1
end function

function formfolder(foldername,foldername1)
%>
  <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="<%= url%>?action=savefolder">
    <tr><td><input name="foldername1" type="hidden" value="<%= foldername1%>"><input name="foldername" type="text" value="<%= foldername%>" style="width:100%"></td></tr>
    <tr><td><center><input type="submit" name="Submit" value="保存" style="width:200"><input type="reset" name="Submit2" value="重置" style="width:200"></center></td></tr>
</form>
  </table>
<%
end function

function upload()





察看评论详细内容 我要发表评论
作者笔名简短内容 发表时间
:

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品