ASP parentfolder and ASP Path attribute example tutorial

Source: Internet
Author: User
Tags parent directory

ASP parentfolder and ASP Path property is the parent directory that determines the current file or folder

Let's take a look at the ParentFolder attribute first.

All right, let's take a look at the ASP FSO Path Property Example Tutorial.

Grammar
Driveobject.path
Fileobject.path

Folderobject.path

<%
Dim fs,d
Set Fs=server.createobject ("Scripting.FileSystemObject")
Set D=FS. Getdrive ("C:")
Response.Write ("The Path is" & D.path)
Set d=nothing
Set fs=nothing
%>
Output:

The path is C:
to the file
<%
Dim fs,f
Set Fs=server.createobject ("Scripting.FileSystemObject")
Set F=FS. GetFile ("c:asptesttest.asp")
Response.Write ("The Path is:" & F.path)
Set f=nothing
Set fs=nothing
The path returned by%>output:the path is:c:asptesttest.asp ParentFolder is the specified drive, file, or folder. The ParentFolder property is used to return the file or folder specified by the parent company of the folder object. Syntax Fileobject.parentfolder folderobject.parentfolder such as a file object <%
Dim fs,f
Set Fs=server.createobject ("Scripting.FileSystemObject")
Set F=FS. GetFile ("c:asptesttest.asp")
Response.Write ("The file test.asp is in the folder:")
Response.Write (F.parentfolder)
Set f=nothing
Set fs=nothing
%>output:the file test.asp is in the Folder:c:asptestparentfolder folder instance tutorial <%
Dim fs,fo
Set Fs=server.createobject ("Scripting.FileSystemObject")
Set FO=FS. GetFolder ("C:asptest")
Response.Write ("The" "The folder test is in the folder:")
Response.Write (fo. ParentFolder)
Set fo=nothing
Set fs=nothing
%>output:the folder test is in the folder:c:asp

Related Article

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.