读取目录下的文件得到一个数组
程序员文章站
2023-08-24 12:34:03
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
上一篇: PS制作一颗超逼真的鸡蛋