ASP tips: Subfolders properties in FSO

Source: Internet
Author: User
Fso| Tips This is an official introduction to subfolders:

Returns a collection of folders that consist of all subfolders in the specified folder, including hidden and system folders.

Object. Subfolders

Object should be the name of the folder object.

Description
The following code provides an example of how to use the subfolders property:

Functionshowfolderlist (FOLDERSPEC)
Dimfso,f,f1,s,sf
Setfso=createobject ("Scripting.FileSystemObject")
Setf=fso. GetFolder (Server.MapPath (FOLDERSPEC))
Setsf=f.subfolders
Foreachf1insf
S=s&f1.name
s=s& "<BR>"
Next
Showfolderlist=s
Endfunction

When referencing: Response.writeshowfolderlist ("./"), you can display a collection of all the folders in the site root.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.