Tutorial-Web Home > The FileSystem Object > The Folder Object

Object Menu

Drive
File
Folder
Attributes
DateCreated
DateLastAccessed
DateLastModified
Drive
Files
IsRootFolder
Name
ParentFolder
Path
ShortName
ShortPath
Size
SubFolders
Type
Copy
Delete
Move
CreateTextFile
FileSystem
TextStream

 


 
Files
TypeRead-Only Property
Return Value TypeCollection
DescriptionReturns the files that are stored in the selected folder.
ExampleCode:
directoryname="c:\test\"
Set fso = CreateObject("Scripting.FileSystemObject")
set mainfolder=fso.GetFolder(directoryname)
Set filecollection = mainfolder.Files
For Each file In filecollection
      Response.Write file.Name
Next

Result:
test.html

The Bookworm
Search the Tutorial-Web library for books on any topic!
Sponsors

Search Now:
In Association with Amazon.com