X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

ASP Files Collection


Folder Object Reference Complete Folder Object Reference

The Files collection returns a collection of all the files in a specified folder.

Syntax

FolderObject.Files

Example

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

Output:

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


Folder Object Reference Complete Folder Object Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook