安大互联
财经热点 > Asp编程 > 读取目录下的文件得到一个数组
读取目录下的文件得到一个数组
浏览次数:【161】  发布日期:2009-8-13 12:09:22    文章分类: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

资料来源:碧波山庄Visual Basic http://ctsvb.126.com

手机扫码浏览该文章
 ● 相关资讯专题
  • 网络建设业务咨询

   TEl:13626712526