These include: extract folder information, create folders, delete folders, copy folders, mobile folders, etc. The following is specifically. First, Fso.Getfolder understands that it is the extraction folder. Is that specific to extract which folder? Behind it is definitely the path to a folder. Apply the folder related information again? Is there a specific extraction. So, look at the program: 1, getfldr.asp <% set fso = createObject ("scripting.filesystemObject") set fldr = fso.getfolder ("C: / Program Files") response.write "parent folder name is:" & FLDR & "
" If FLDR.ISROTFOLDER = TRUE THEN RESPONSE.WRITE "This folder is a folder" & "
" Else Response.write "This folder is not root folder" & "
"End ifresponse.write" drive name is: "& fldr.drive &"
"%> The connection to build FSO components is essential, then set fldr = fso.getFolder (" C: / Program Files ") Set the FLDR object to be assigned to make a reference to the following programs. FLDR.ISRootfolder is to determine if the folder is a folder, the value is a true or false; FLDR.DRIVE displays the drive letter in the folder. Second, fso.createfolder is more exciting to establish a folder through the ASP, you can establish any folder anywhere within your power. 2. Creatfldr.asp <% set fso = createObject ("scripting.filesystemObject") fso.createfolder ("c: / cnbruce") response.write "folder name" & fso.getbasename ("c: / cnbruce") %> Execute the program, you should find that the C disk has a CNBRUCE folder, and fso.getBaseName is an extracting folder name. Third, Fso.Deletefolder can establish a folder through the ASP, or the folder can also be deleted. 3, Delfldr.asp <% set fso = createObject ("scripting.filesystemObject") fso.deletefolder ("c: / cnbruce") response.write "folder"%> Discover the original CNBRUCE folder is indeed delete. Then use a general program to flexibly strain.
4, mainflr.asp <% Sub CreateAFolder (file) Dim fso Set fso = CreateObject ( "Scripting.FileSystemObject") fso.CreateFolder (file) response.write "has established" & fileEnd SubSub DeleteAFolder (file) Dim fso Set fso = CreateObject ("scripting.filesystemObject") fso.deletefolder (file) response.write "deleted" & FileEnd Sub%> <% Subname = Request.form ("Submit") Create = Request.form ("Create") DEL = Request.form ("DEL") if Subname <> "" "" "& CREATE &" "" "& Create &" "" "& del") end if End IF%>