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
资料来源:碧波山庄Visual Basic http://ctsvb.126.com
推荐阅读
读取目录下的所有文件(包括子目录下的所有文件)
******************************
Many times we might need some part of code which will access all sub-folders of the server and also all
files within the sub-folder.
The following line of asp code w>>>详细阅读
本文标题:读取目录下的文件得到一个数组
地址:http://www.17bianji.com/kaifa2/ASP/32956.html
1/2 1