找很久,也終於給我找到了
這可是很多書上沒有寫的喔

FileSystemObject的資料本來就比較少
反正都變成ASP.net了,這種驚訝應該不是很多人能體會吧
因為這些都是ASP.net的基本配備=  =

傳入絕對路徑,會傳回整理過的檔案列表(包含子資料夾)

有興趣的人煩請看程式碼更動,謝謝。

------------------------------------------------------------------------------

'顯示檔案列表  
Function ShowFileList(folderspec)  
Dim f, f1, fc, s  
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(folderspec)) Then
Set f = fso.GetFolder(folderspec)  

Set fc = f.SubFolders
For Each f1 in fc  
s = s &"<dir>"& f1.name  
s = s & "<br>"  
Next  

Set fc = f.Files  
For Each f2 in fc  
s = s & f2.name  
s = s & "<br>"  
Next  
ShowFileList = s  
Else  
ShowFileList = -1  
End if  
End Function  

arrow
arrow
    全站熱搜

    Johnny 鋼鍊 發表在 痞客邦 留言(0) 人氣()