Latest web development tutorials

ASPファイルのコレクション

フォルダのオブジェクト参照 完全なフォルダオブジェクトリファレンス

すべてのファイルの指定されたフォルダのコレクションを返すために、ファイルのコレクション。

文法

FolderObject.Files

<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test\")

for each x in fo.files
'Print the name of all files in the test folder
Response.write(x.Name & "<br>")
next

set fo=nothing
set fs=nothing
%>

出力:

test_adv.txt
guestbook.txt
links.txt
links2.txt
textads.txt
textfile.txt


フォルダのオブジェクト参照 完全なフォルダオブジェクトリファレンス