Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3855394
  • 博文数量: 421
  • 博客积分: 685
  • 博客等级: 上将
  • 技术积分: 3670
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-18 14:20
文章分类

全部博文(421)

文章存档

2012年(5)

2011年(52)

2010年(83)

2009年(67)

2008年(65)

2007年(149)

分类: 系统运维

2010-11-25 12:20:46

 
源码如下:
 
<%@ Language=VBscript %>
<%
Response.Buffer=true
On Error Resume Next
Server.ScriptTimeOut = 1000
Response.Expires=0
Dim StartTime,IsReplace
IsReplace = true '是否过滤编辑时文件的标记,如不过滤遇到有












<%
End If
Set Fso = nothing
End Sub
'****************************************
'函数定义部分结束
'****************************************
%>
<%
Dim Fso,FsoFile,FileType,FileSize,FileTime,Path
Dim Dir
action=Trim(Request.QueryString("action"))
Set Fso=Server.CreateObject("Scripting.FileSystemObject")
IsErr
If action = "Del" then
   Call DelAll
ElseIf action = "NewFile" then
   Call NewFile
ElseIf action = "NewFolder" then
   Call NewFolder
ElseIf action = "Rname" then
   Call Rname
ElseIf action = "Edit" then
   Call Edit
ElseIf action = "Save" then
   Call Edit
Else
   Dir=Trim(Request.QueryString("Dir"))
   Path = Server.MapPath(".") & Dir
   Set FsoFile = Fso.GetFolder(Server.MapPath("."))
   FsoFileSize = FsoFile.size '空间大小统计
   Set FsoFile = nothing
   Set FsoFile = Fso.GetFolder(Path)
%>


FSO在线编辑——阿赛特别版

<% Call Css %>





















  




















 
系统主目录:<%=Server.MapPath(".")%>   空间占用:<%=GetFileSize(FsoFileSize)%>
 >返回到上一目录  当前目录:<%=Server.MapPath(".") & Dir %>
 占用空间:<%=GetFileSize(FsoFile.size)%>  其中包含 <%=FsoFile.SubFolders.count%> 个文件夹; <%=FsoFile.Files.count%> 个文件
    新建文件夹:

 





    新建文件:  

 

  

  


  
  
  
  
  

<%
   For Each DirFolder in FsoFile.SubFolders
   FolderName=DirFolder.name
   FolderSize=GetFileSize(DirFolder.size)
   FolderTime=DirFolder.DateLastModified
%>

  
  
  
  
  

<% Next %>
<%
   For Each DirFiles in FsoFile.Files
   FileName=DirFiles.name
   FileType=GetFileIcon(FileName)
   FileSize=GetFileSize(DirFiles.size)
   FileTime=DirFiles.DateLastModified
%>

  
  
  
  
  

<% Next %>





  文件/文件夹名 类型文件大小最后修改时间

   
  
 \<%=FolderName%>><%=FolderName%>文件夹<%=FolderSize%><%=FolderTime%>

   
  
  target=_blank><%=FileName%><%=FileType%>文件<%=FileSize%><%=FileTime%>


 







  程序制作:阿赛工作室  程序运行时间:<%=FormatNumber((Timer()-StatrTime)*1000,3) %> 毫秒
 



<%
End If
Set FsoFile = nothing
Set Fso = nothing
%>
 
阅读(3107) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~