How to specify a file path: basic rules

Despite the fairly high automation of all processes and user actions that are provided for in Windows-systems, sometimes there is a need to manually set the path to some object stored on local disks or on remote servers on the Internet. There can be a lot of situations when it is extremely necessary to enter such data, but usually ordinary users are limited to the simplest actions when setting command execution on the command line, when calling program modules quickly, when checking the location of objects on local or network resources, etc. Further let's try to decide how to specify the path to a file or to any other object, touching only the most basic aspects and actions that may be needed in everyday work, without delving into the nuances of organizing complex ruktur web pages.

What is the path to a file, directory, disk, or web page?

First, let's define the basic concept of a file path. What it is? Roughly speaking, the path to any object is a full or abbreviated link to its physical location on the hard drive or on the Internet (but also on the hard drive of a remote server or computer). In a sense, a computer-assisted route can be compared to the usual postal address where you live.

Example Mailing Address




So, for example, the address indicates the country, city, street, house, building, apartment and name of the tenant. The analogy here is this:





  • country - a disk or a remote network resource;
  • name of the tenant or addressee - name of the final file;
  • everything else is subfolders.

Many may notice that the postal address also indicates the city index. It can be purely conditionally correlated, say, with the IP address of a page on the Internet or in a network environment, since such paths are almost never used for local resources.

Now let's see how to specify the path to the file, based on such an analogy. To begin, consider local resources, that is, media connected directly to one computer.

Types of paths

But here it is immediately worth making another small digression. When specifying the path to any object, one must take into account that they can be either absolute (full) or relative (abbreviated). Full paths are used to indicate the exact location of the desired object, and relative paths are for objects that may be located in certain folders, for which you do not need to specify their location (this is most often used in web programming when creating links to go to a document).

How to write a file path on Windows systems: general rules

But this was all theory so far. Let's move on to practice.

Specifying the path to the file on the local drive




So, the absolute path should always begin with an indication of the letter (letter) of the disk or medium, followed by a colon. After it, the backslash is entered (the slash with a slope to the left), then all intermediate directories are indicated (again, through the separator in the form of a slash), and at the end the file name is entered with the obligatory indication of its extension.





Recording paths for web pages

Now it’s worth mentioning separately how to specify the path to a file located on a remote server (on the Internet). It is clear that in this case you cannot determine the exact drive letter. Actually, this is not necessary.

Specifying the path to the file on the Internet




As an absolute path, the sequence in which the name of the protocol is entered first (for example, http, https, etc.) is indicated. Then a colon is put, a double right slash is indicated. After that, through a single right slash, all intermediate pages (resources) are registered. And in the end, as in the previous case, the name of the file with the extension or the name of the directory (or page) containing it is set to view all objects.

How to find out where the file is located?

But very often you can meet situations where you do not know the absolute path to the desired object, and it is urgently necessary to determine it. To do this, you can use the "Explorer" and simply set the file name in a special search field or perform a similar search by extension, entering it after the period and enclosing it in asterisks.

Copying the absolute path to a folder in Explorer




In the case of folders in the address bar, the path can be copied using the PCM menu item “Copy address as text”, and then pasted into the desired location, adding the file name manually. However, you can use the properties of the file itself, which will also indicate the directory in which it is located.

File path in shortcut properties




But if there is a shortcut for the file already in its properties, you should pay attention to the object type field. In which the absolute path will be indicated.

Methods for quickly copying paths and opening files you need

How to specify the path to the file, a little figured out. Now briefly dwell on some methods that allow you to speed up the opening of files or copying their addresses (paths).

Specifying the absolute path to the file on the command line




For example, using the copy described above, links to absolute file paths can be inserted into the command console, but the path itself must be enclosed in quotation marks on both sides. In order not to do such things, you can simply drag the desired object from the "Explorer" to the command line. If it is an executable program file, it will start immediately. If this is some kind of document, it will be automatically opened in the application associated with it.

In the end, it remains to add that very often you may need to use the Run console. As the simplest commands, it introduces the names of executable components for which the path to the file and the extension of the launched object are often not required. Why? Yes, only because the Run menu is mainly intended for calling executable applets (usually EXE-format and some others) located by default either in the System32 directory or in the Windows directory.

Specifying the relative path to the file in the Run menu




For example, to start the registry editor, just enter the name of the regedit file , to start the standard Notepad notepad, for the command line cmd , etc. In principle, if you make some simple settings, you can specify any application for this type of quick start or some document, but this is a separate topic for discussion.




All Articles