代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
ASP
】
FSO显示特殊文件夹
作者:
Dezai.CN
/ 发布于
2012/10/24
/
997
FSO显示特殊文件夹
<div><span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Verdana, sans-serif; font-size: 14px; line-height: 25px; background-color: rgb(247, 252, 255);">先附bat创建畸形目录,以下代码复制另存为a.bat:</span></div> <div class="codetitle" style="padding: 0px 3px; margin: 3px auto 0px; border-left-color: rgb(0, 153, 204); border-left-width: 1px; border-left-style: solid; width: 600px; background-color: rgb(242, 246, 251); clear: both; font-size: 14px; border-top-color: rgb(0, 153, 204); border-top-width: 1px; border-top-style: solid; border-right-color: rgb(0, 153, 204); border-right-width: 1px; border-right-style: solid; line-height: 25px; color: rgb(51, 51, 51); font-family: Arial, Tahoma, Verdana, sans-serif;"><span style="padding: 0px; margin: 0px; float: right; cursor: pointer;"><u style="padding: 0px; margin: 0px;">复制代码</u></span>代码如下:</div> <div class="codebody" id="code50417" style="padding: 0px 3px 0px 5px; margin: 0px auto 3px; border: 1px solid rgb(0, 153, 204); width: 598px; background-color: rgb(221, 237, 251); clear: both; font-size: 14px; line-height: 25px; color: rgb(51, 51, 51); font-family: Arial, Tahoma, Verdana, sans-serif;"><br style="padding: 0px; margin: 0px;"> md aux\\<br style="padding: 0px; margin: 0px;"> md com1\\<br style="padding: 0px; margin: 0px;"> md com2\\<br style="padding: 0px; margin: 0px;"> md prn\\<br style="padding: 0px; margin: 0px;"> md con\\<br style="padding: 0px; margin: 0px;"> md nul\\<br style="padding: 0px; margin: 0px;"> md dot...\\<br style="padding: 0px; margin: 0px;"> md onedot..\\</div> <div><br style="padding: 0px; margin: 0px; color: rgb(51, 51, 51); font-family: Arial, Tahoma, Verdana, sans-serif; font-size: 14px; line-height: 25px; background-color: rgb(247, 252, 255);"> <span style="color: rgb(51, 51, 51); font-family: Arial, Tahoma, Verdana, sans-serif; font-size: 14px; line-height: 25px; background-color: rgb(247, 252, 255);">程序代码</span></div> <div class="codetitle" style="padding: 0px 3px; margin: 3px auto 0px; border-left-color: rgb(0, 153, 204); border-left-width: 1px; border-left-style: solid; width: 600px; background-color: rgb(242, 246, 251); clear: both; font-size: 14px; border-top-color: rgb(0, 153, 204); border-top-width: 1px; border-top-style: solid; border-right-color: rgb(0, 153, 204); border-right-width: 1px; border-right-style: solid; line-height: 25px; color: rgb(51, 51, 51); font-family: Arial, Tahoma, Verdana, sans-serif;"><span style="padding: 0px; margin: 0px; float: right; cursor: pointer;"><u style="padding: 0px; margin: 0px;">复制代码</u></span>代码如下:</div> <div class="codebody" id="code42131" style="padding: 0px 3px 0px 5px; margin: 0px auto 3px; border: 1px solid rgb(0, 153, 204); width: 598px; background-color: rgb(221, 237, 251); clear: both; font-size: 14px; line-height: 25px; color: rgb(51, 51, 51); font-family: Arial, Tahoma, Verdana, sans-serif;"><br style="padding: 0px; margin: 0px;"> <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><br style="padding: 0px; margin: 0px;"> <%<br style="padding: 0px; margin: 0px;"> option explicit<br style="padding: 0px; margin: 0px;"> response.charset = "UTF-8"<br style="padding: 0px; margin: 0px;"> session.codepage = 65001<br style="padding: 0px; margin: 0px;"> session.timeout = 1440<br style="padding: 0px; margin: 0px;"> server.scripttimeout = 9999<br style="padding: 0px; margin: 0px;"> '***************************<br style="padding: 0px; margin: 0px;"> '名称:目录列表类<br style="padding: 0px; margin: 0px;"> '作者:逸品<br style="padding: 0px; margin: 0px;"> '日期:2010-4-28<br style="padding: 0px; margin: 0px;"> '网址:www.jb51.net<br style="padding: 0px; margin: 0px;"> '描述:目录列表类,支持畸形目录名<br style="padding: 0px; margin: 0px;"> '***************************<br style="padding: 0px; margin: 0px;"> Class FsoCls<br style="padding: 0px; margin: 0px;"> Private Fso<br style="padding: 0px; margin: 0px;"> Public FsoObj<br style="padding: 0px; margin: 0px;"> Private Sub Class_Initialize<br style="padding: 0px; margin: 0px;"> Set Fso=CreateObject("Scripting.FileSystemObject")<br style="padding: 0px; margin: 0px;"> Set FsoObj=Fso<br style="padding: 0px; margin: 0px;"> End Sub<br style="padding: 0px; margin: 0px;"> Private Sub Class_Terminate<br style="padding: 0px; margin: 0px;"> Set Fso=Nothing<br style="padding: 0px; margin: 0px;"> Set FsoObj=Nothing<br style="padding: 0px; margin: 0px;"> End Sub<br style="padding: 0px; margin: 0px;"> Function IsFolderExists(FolderPath)<br style="padding: 0px; margin: 0px;"> If fso.FolderExists(FolderPath) Then<br style="padding: 0px; margin: 0px;"> IsFolderExists = true<br style="padding: 0px; margin: 0px;"> Else<br style="padding: 0px; margin: 0px;"> IsFolderExists = false<br style="padding: 0px; margin: 0px;"> End If<br style="padding: 0px; margin: 0px;"> End Function<br style="padding: 0px; margin: 0px;"> Function FolderItem(ByVal FolderDir)<br style="padding: 0px; margin: 0px;"> If Instr(FolderDir,":\")>0 Then<br style="padding: 0px; margin: 0px;"> FolderDir="\\?\"&FolderDir&"\"<br style="padding: 0px; margin: 0px;"> Else<br style="padding: 0px; margin: 0px;"> FolderDir="\\?\"&Server.MapPath(FolderDir)&"\"<br style="padding: 0px; margin: 0px;"> End If<br style="padding: 0px; margin: 0px;"> If IsFolderExists(FolderDir) = False Then<br style="padding: 0px; margin: 0px;"> FolderItem=False<br style="padding: 0px; margin: 0px;"> Exit Function<br style="padding: 0px; margin: 0px;"> End if<br style="padding: 0px; margin: 0px;"> Dim FolderObj,FolderList,F,i<br style="padding: 0px; margin: 0px;"> i=1<br style="padding: 0px; margin: 0px;"> Set FolderObj=Fso.GetFolder(FolderDir)<br style="padding: 0px; margin: 0px;"> Set FolderList=FolderObj.SubFolders<br style="padding: 0px; margin: 0px;"> FolderItem="目录总数:"&FolderObj.SubFolders.Count&"<hr>" & vbcrlf<br style="padding: 0px; margin: 0px;"> FolderItem=FolderItem&"文件总数:"&FolderObj.Files.count&"<hr>" & vbcrlf<br style="padding: 0px; margin: 0px;"> <br style="padding: 0px; margin: 0px;"> For Each F In FolderList<br style="padding: 0px; margin: 0px;"> 'Response.Write F.ShortName<br style="padding: 0px; margin: 0px;"> 'Response.Write (instr(1,F.ShortName,"~",1))<br style="padding: 0px; margin: 0px;"> If IsFolderExists(FolderDir&F.Name) = True Then Response.Write ("T" & vbcrlf)<br style="padding: 0px; margin: 0px;"> If(instr(1,F.Name,".",0)>0) Then<br style="padding: 0px; margin: 0px;"> Response.Write ("T")<br style="padding: 0px; margin: 0px;"> F.Name=Replace(F.Name,".","-")<br style="padding: 0px; margin: 0px;"> End if<br style="padding: 0px; margin: 0px;"> FolderItem=FolderItem&i&"├─文件夹→"&F.Name&"" & vbcrlf<br style="padding: 0px; margin: 0px;"> i=i+1<br style="padding: 0px; margin: 0px;"> Next<br style="padding: 0px; margin: 0px;"> Set FolderList=Nothing<br style="padding: 0px; margin: 0px;"> Set FolderObj=Nothing<br style="padding: 0px; margin: 0px;"> End Function<br style="padding: 0px; margin: 0px;"> End Class<br style="padding: 0px; margin: 0px;"> %><br style="padding: 0px; margin: 0px;"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br style="padding: 0px; margin: 0px;"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn"><br style="padding: 0px; margin: 0px;"> <head><br style="padding: 0px; margin: 0px;"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br style="padding: 0px; margin: 0px;"> <title>目录列表类 支持畸形目录名</title><br style="padding: 0px; margin: 0px;"> </head><br style="padding: 0px; margin: 0px;"> <body><br style="padding: 0px; margin: 0px;"> <%<br style="padding: 0px; margin: 0px;"> Dim F: Set F = new FsoCls<br style="padding: 0px; margin: 0px;"> Response.write F.FolderItem("/")<br style="padding: 0px; margin: 0px;"> %><br style="padding: 0px; margin: 0px;"> </body><br style="padding: 0px; margin: 0px;"> </html></div>
试试其它关键字
特殊文件夹
同语言下
.
二进制输出
.
查找text文本中指定字符或词所在句子
.
阻止浏览器冒泡事件,兼容firefox和ie
.
xmlhttp 读取文件
.
定时跳转页面
.
除asp中所有超链接
.
获取Session
.
打包时自定义应用程序的快捷方式与卸载
.
获取局域网中可用SQL Server服务器
.
判断汉字字数
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
Dezai.CN
贡献的其它代码
(
4037
)
.
多线程Socket服务器模块
.
生成随机密码
.
清除浮动样式
.
弹出窗口居中
.
抓取url的函数
.
使用base HTTP验证
.
div模拟iframe嵌入效果
.
通过header转向的方法
.
Session操作类
.
执行sqlite输入插入操作后获得自动编号的ID
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3