ASP Files Collection Last Updated : 19 Mar, 2021 Comments Improve Suggest changes Like Article Like Report The ASP Files Collection is used to return the collection of all the files present in a specified folder. These can be looped through to get the details of the individual files. Syntax: FolderObject.Files Example: The below code demonstrates the ASP File.Files Collection. ASP <% dim fs,fo,x set fs=Server.CreateObject("Scripting.FileSystemObject") 'Get the folder to be read set fo=fs.GetFolder("d:\geeks\") 'Loop through the files present in the folder for each x in fo.files 'Print the name of the file Response.write("Filename: " & x.Name & "<br>") next set fo=nothing set fs=nothing %> Output: Filename: GFG_adv.txt Filename: sudo.txt Filename: ram.txt Filename: shyam.txt Comment More infoAdvertise with us Next Article ASP FileSystem.Drives Property M manaschhabra2 Follow Improve Article Tags : Websites & Apps ASP-Basics Similar Reads ASP SubFolders Collection The ASP SubFolders Collection is used to return the collection of all the subfolder in a specified folder. Syntax: FolderObject.SubFolders Example: The below code demonstrates the ASP Folder.SubFolders Collection. ASP <% dim fs,fo,x set fs=Server.CreateObject("Scripting.FileSystemObject") 'Get t 1 min read ASP GetFile Method The GetFile Method in ASP is used to return the File object corresponding to the file in a specified path. It is a predefined method of the FileSystem Object. Syntax: FileSystemObject.GetFile(path) Parameter Values: path: It is a required attribute. It specifies the path for the File. Example Code 1 min read ASP FileSystem.Drives Property The FileSystem.Drives Property is used to return a read-only collection of all Drive objects that are present on the system. The individual drive elements can be lopped through to get their properties. Syntax: FileSystemObject.Drives Example: The below code illustrates how to display all the drive l 1 min read ASP FileExists Method The FileExists Method in ASP is used for returning the Boolean value which indicates that whether a particular file exists or not. It returns true means the particular file exits or returns false if the particular file not exits.  Syntax: FileSystemObject.FileExists(filename) Parameter Values: file 1 min read ASP GetSpecialFolder Method The ASP GetSpecialFolder Method is used to return a reference to a specified special Folder. Syntax: FileSystemObject.GetSpecialFolder(foldername) Parameter Values FolderName: Required attribute. It specifies the name of the special folder to be returned. It contains a numeric value between 0 and 1 min read ASP ParentFolder Property The ASP ParentFolder Property is used to return the complete path for the parent folder of a specified file or folder. Syntax: For File Object: FileObject.ParentFolder For Folder Object: FolderObject.ParentFolder The below examples illustrate the ASP ParentFolder Property. Example 1: The below code 1 min read Like