读取目录下的文件得到一个数组
程序员文章站
2022-06-05 12:25:58
filename=dir("盘符:\*.*")
i = 0
do while filename = ""
array1...
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
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
下一篇: sqlserver查询某个表有哪些字段