Files

阅读:40      收藏:0      [点我收藏+]

ASP Files 集合


Files 集合返回指定的文件夹中所有文件组成的一个集合。

语法

FolderObject.Files

实例

<%
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
%>

输出:

test_adv.txt
guestbook.txt
links.txt
links2.txt
textads.txt
textfile.txt
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!