读取目录下的文件得到一个数组
类别: ASP教程
filename=dir("盘符:*.*")
i = 0
do while filename = ""
array1 (i)=filename
i = i + 1
filename = dir("c:*.*")
loop
VB好象也有比较好的方法,但是我不太清楚了
VBScript
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder("盘符:")
Set fc = f.Files
i = 0
For Each f1 in fc
array1(i)=f1.name
i=i+1
Next
i = 0
do while filename = ""
array1 (i)=filename
i = i + 1
filename = dir("c:*.*")
loop
VB好象也有比较好的方法,但是我不太清楚了
VBScript
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder("盘符:")
Set fc = f.Files
i = 0
For Each f1 in fc
array1(i)=f1.name
i=i+1
Next
- 上一篇: ASP中常见的80004005错误原因及解决
- 下一篇: 检测表单输入EMAIL的合法性
-= 资 源 教 程 =-
文 章 搜 索