What’s a path name?

Print anything with Printful



A path name is a hierarchical name used by computers to locate files. It starts with the root directory and goes down through each folder. A file can have a full or relative path. Full paths start with the root directory, while relative paths assume the file is in the same directory as the working directory.

A path name is a name used by a computer to locate a file that the user wants to access. Each component in the path refers to a folder or directory. When a user names a file, that filename is the last entry in the path. Path names are hierarchical in nature: they start with the root directory and go down through each file and folder to reach the file the user wants to access. This way, when the user wants to access a file, the computer can trace the path from the root directory to the file that the user wants to access.

In general, the first component in a path is the root directory. On many computers, the root directory will also provide the drive letter. For example, if the root directory refers to the hard disk drive, the root directory would be C:/, where “C” is the drive letter. Drive letters vary depending on which drive the user wants to access. If a person wants to find a file on a flash drive, the root directory will be the letter indicated on the flash drive.

After the root directory, the path contains all other folders that the computer will have to traverse to find the specified file name. For example, if a user is looking for a file with the path C:/documentsandsettings/user/pic.png, the computer will have to look in the C drive, in the “documentsandsettings” folder in the “user, ” folder and locate the file name “pic.png”. On many computers, each directory name is separated by a forward slash (/) or colon (:). However, some computer systems use a backslash () or other delimiter. This hierarchy is also important for how Uniform Resource Locators (URLs) work.

A file can have a full path, also known as an absolute, or a relative path. Full paths provide the entire path and point the computer to the same location, regardless of the working directory. It is always given in reference to the root directory. A relative path gives only part of the path name. This lets the computer “assume” that the file is in the same directory as the working directory.

For example, a full path can be provided as follows: C:/documentsandsettings/user/mydocuments/writingfolder/pathnames.doc. Note that the root directory starts the path. However, a relative path can be something like pathnames.doc. If the user is using the working directory, “writingfolder”, and if no other information is provided, the computer will automatically look for the file name in the “writingfolder” directory. Therefore, a relative path is provided in relation to a working directory.




Protect your devices with Threat Protection by NordVPN


Skip to content