讀取目錄下的文件得到一個數(shù)組
更新時間:2006年10月28日 00:00:00 作者:
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
相關(guān)文章
ASP中FSO對象對IIS WEB服務(wù)器數(shù)據(jù)安全的威脅及對策
ASP中FSO對象對IIS WEB服務(wù)器數(shù)據(jù)安全的威脅及對策...2006-10-10ASP中文本文件與數(shù)據(jù)庫文件的數(shù)據(jù)交換(FSO)
ASP中文本文件與數(shù)據(jù)庫文件的數(shù)據(jù)交換(FSO)...2006-10-10