设为首页】 【加入收藏】 【网站地图】 【商品折扣
娱乐一生 娱乐明星
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
首页  |  java  |  .NET  |  C/C++  |  网页技术  |  php  |  asp  |  delphi  |  VC  |  VB开发  |  游戏开发  |  软件工程  |  Power Builder  |  Linux开发  |  Windows开发技巧
当前位置:首页 >> ASP实例 >> 简单的文件目录浏览源程序_ASP实例_src119.com

简单的文件目录浏览源程序_ASP实例_src119.com -


 '**************************************
 ' Name: File / Directory Viewer
 ' Description:This Will Di lay All The
 ' Files, File Size and file date of every
 ' file in the directory you  ecify.
 To make this work, paste the code into your favorite html editor, save it and Then view it.
 ' By: Thomas Michael
 '
 '
 ' I uts:None
 '
 ' Retur :None
 '
 'A umes:File System Object Be Needed :)
 ' and it is setup to look for you my docum
 ' ents folder at "c:\mydocu~1" but you can
 ' change the line of code to look in any d
 ' irectory.
 '
 'Side Effects:None
 '
 'Warranty:
 'code provided by Planet Source Code(tm)
 ' (http://www.Planet-Source-Code.com) 'as
 ' is', without warranties as to performanc
 ' e, fitne , merchantability,and any othe
 ' r warranty (whether expre ed or implied
 ' ).
 'Terms of Agreement:
 'By using this source code, you agree to
 ' the following terms...
 ' 1) You may use this source code in per
 ' onal projects and may compile it into a
 '  .exe/.dll/.ocx and distribute it in bi
 ' ary format freely and with no charge.
 ' 2) You MAY NOT redistribute this sourc
 ' e code (for example to a web site) witho
 ' ut written permi ion from the original
 ' author.Failure to do so is a violation o
 ' f copyright laws.
 ' 3) You may link to this code from anot
 ' her we ite, provided it is not wra ed
 ' in a frame.
 ' 4) The author of this code may have re
 ' tained certain additional copyright righ
 ' ts.If so, this is indicated in the autho
 ' r's description.
 '**************************************
 
 lt;%@ LANGUAGE="V CRIPT" %>
 lt;% Option Explicit %>
 lt;HTML>
 lt;HEAD> <TITLE>File Viewer</TITLE> </HEAD>
 lt ODY>
 lt;TABLE width="100%" border=1 bordercolor="#000000" align="left" cellpadding="2" cell acing="0" gt;
 lt;TR align="left" valign="to quot; bgcolor="#000000" gt;
  <TD width="65%" gt lt;FONT color="#FFFFFF" gt lt gt lt;FONT size="2" face="Verdana, Arial, Helvetica, sa -
serif" gt;Title</FONT> lt;/ gt lt;/FONT> lt;/TD>
 lt;TD width="10%" gt lt;FONT color="#FFFFFF" gt lt gt lt;FONT size="2" face="Verdana, Arial, Helvetica, sa -
serif" gt ize</FONT> lt;/ gt lt;/FONT> lt;/TD>
 lt;TD width="25%" gt lt;FONT color="#FFFFFF" gt lt gt lt;FONT size="2" face="Verdana, Arial, Helvetica, sa -
serif" gt;Date</FONT> lt;/ gt lt;/FONT> lt;/TD>
 lt;/TR>
 lt;%
  'File System Object
  Dim objFSO
  'File Object
  Dim objFile
  'Folder Object
  Dim objFolder
  'String To Store The Real Path
  Dim sMa ath
  'Create File System Object To Get list of files
  Set objFSO = CreateObject(" cripting.FileSystemObject")
  'Get The path For the web page and its dir.
  'change this setting To view different directories
  sMa ath = "C:\Mydocu~1"
  'Set the object folder To the ma ed path
  Set objFolder = objFSO.GetFolder(sMa ath)
  'For Each file In the folder
  For Each objFile In objFolder.Files
  %>
  <TR align="left" valign="to quot; bordercolor="#999999" bgcolor="#FFFFFF" gt;
  <TD> <FONT size="2" face="Verdana, Arial, Helvetica, sa -serif" color="#000000" gt lt;A href=" lt;% =
sMa ath &am  "/" &am  objFile.Name %> quot gt;
  <%
  'write the files name
  Re o e.Write objFile.Name
  %>
  </A>
  </FONT>
  </TD>
 lt;TD>
  <FONT size="2" face="Verdana, Arial, Helvetica, sa -serif" color="#000000" gt;
 
  <%
  'We will format the file size so it looks pretty
  If objFile.Size <1024 Then
  Re o e.Write objFile.Size &am  " Byte quot;
  ElseIf objFile.Size < 1048576 Then
  Re o e.Write Round(objFile.Size / 1024.1) &am  " K quot;
  Else
  Re o e.Write Round((objFile.Size/1024)/1024.1) &am  " M quot;
  End If
  %>
  </FONT>
  </TD>
 lt;TD>
  <FONT size="2" face="Verdana, Arial, Helvetica, sa -serif" color="#000000" gt;
  <% 'the files Date
  Re o e.Write objFile.DateLastModified
  %>
  </FONT>
  </TD>
  </FONT>
  </TD>
  </TR>
  <%
  Next
  %>
 lt;/TABLE>
 lt;/BODY>
 lt;/HTML>






 

娱乐图摘

更多 >>

靓丽清纯美女meimei

美女私房全裸照
导演劝女演员脱衣服(视频)

大胆火辣人体艺术写真(图)

黑丝妹妹热辣诱惑-丝袜美女妹妹

PLMM 漂亮妹妹图集-妹妹图库

全球美女图库-美女集中营

52MM 我爱漂亮妹妹-制服妹妹诱惑

图王图库-世界美女明星图片资料库
美女写真集锦

激情两性-解密性生活
浴室MM湿身内衣诱惑
邻家小妹洗澡被偷拍(视频)

热点文章

更多

· XMLHTTP+Javascript+Asp写得聊天室,无刷
· 让您的主页支持各种浏览设备(ASP+篇)(下)_ASP实例_
· 将你的网站设置为客户的信任站点--WSH方案_ASP实例_s
· W3 Jmail中文使用说明_ASP实例_src119.co
· 利用XSL和ASP在线编辑XML文档_ASP实例_src11
· 一种在线人数统计方法(只用1个APPLICATION)_AS
· aspemail组件的应用_ASP实例_src119.com
· ASP连接执行程序 _ASP实例_src119.c
· 嵌入式Web视频点播系统实现方法_ASP实例_src119.
· 利用ASP实现三个强大功能之三_ASP实例_src119.c

热点文章

更多