当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Files 集合

ASP
ASP Drive
ASP File
ASP Folder
ASP Dictionary
ASP ADO
ASP AdRotator
ASP BrowserCap
ASP Content Linking
ASP Content Rotator
ASP Quick Ref
ASP 摘要
ASP 实例

ASP Files 集合


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 333 ::
收藏到网摘: n/a

The Files collection returns a collection of all the files in a specified folder.
ASP Files集合返回了一个指定文件夹中文件的集合。

Syntax
语法

FolderObject.Files

Example
举例

<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:test")
for each x in fo.files 'Print the name of all files in the test folder Response.write(x.Name & "<br />")
next
set fo=nothing
set fs=nothing
%>

Output:

test_adv.txt
guestbook.txt
links.txt
links2.txt
textads.txt
textfile.txt

评论 (0) All

登陆 | 还没注册?