Raccolta di file ASP


❮ Riferimento completo all'oggetto cartella

La raccolta File restituisce una raccolta di tutti i file in una cartella specificata.

Sintassi

FolderObject.Files

Esempio

<%
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
%>

Produzione:

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

❮ Riferimento completo all'oggetto cartella