[Others] special folders for each folder

Source: Internet
Author: User

Anyone who has used the doscommand knows that the command to return to the upper-level directory is "CD .. "; people who have used relative paths know" .. "indicates the upper-level directory,". "represents the current directory. I have always thought this is a special fixed command. I did not realize this until today when I encountered a difficult problem in programming.

When we enter the Dir command in the command prompt, two special folders are displayed in the returned list, whose names are ". and... ", these two special folders are hidden in each folder. Obviously,". "represents the current folder, and" .. "indicates the upper-level folder. The preceding examples use these two folders.

Because these two folders are mostly used in relative paths, they give an illusion that they can only be used in relative paths (at least I thought so before ). In fact, they can still be used in absolute paths. For example, enter the following string in the address bar of my computer: "C: \ Program Files \ Internet Explorer \ Connection Wizard \.. \.. "Press enter to go to the C: \ Program Files folder, and enter" C: \ Program Files \ Internet Explorer \. \. "is maintained in the original folder.

In addition, these two special folders can also be used on URLs. For example, use download tools such as thunder to download

This file can be downloaded successfully. The actual URL of this file is http://www.java3z.com/cwbwebhome/css/index.css.

In some cases, if we want to extract a CSS or script file from a webpage, these files may be recorded in the HTML file of the webpage as relative paths, for example, the CSS file mentioned above is like this in the HTML file:

You only need to combine the page path with the path in the href attribute to extract the file, which is very convenient and requires no complicated work.

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.