example: vb filename=dir("c:/*.*") 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("c:/") set fc = f.files i = 0 for each f1 in fc array1(i)=f1.name i=i+1 next