Path (computing)
A path (or filepath, file path, pathname, or similar) is a string that uniquely identifies an item in a hierarchical file system. Generally, a path is composed of directory names, special format specifiers, and optionally a filename, all separated by delimiters. This delimiter can vary by operating system, but popular, modern systems use the slash , backslash , or colon . The case-sensitivity of individual path components will vary based on operating system, or based on options specified at the time of a file system's creation or first use. In practice, this means that for a case-sensitive system, path components named and can coexist at the same level in the hierarchy, whereas for a case-insensitive file system, they cannot (an error will occur). macOS and Windows' native file systems are case-insensitive by default, whereas typical Linux file systems are case-sensitive. A path can be either relative or absolute. A relative path is a path in relation to another, most often the...
A path (or filepath, file path, pathname, or similar) is a string that uniquely identifies an item in a hierarchical file system. Generally, a path is composed of directory names, special format specifiers, and optionally a filename, all separated by delimiters. This delimiter can vary by operating system, but popular, modern systems use the slash , backslash , or colon . The case-sensitivity of individual path components will vary based on operating system, or based on options specified at the time of a file system's creation or first use. In practice, this means that for a case-sensitive system, path components named and can coexist at the same level in the hierarchy, whereas for a case-insensitive file system, they cannot (an error will occur). macOS and Windows' native file systems are case-insensitive by default, whereas typical Linux file systems are case-sensitive. A path can be either relative or absolute. A relative path is a path in relation to another, most often the working directory. An absolute path indicates a location regardless of the current directory; that is, it specifies all path components starting from the file system's root, and does not depend on context like a relative path does. Paths are also essential for locating hierarchically-organized network resources, as seen in URLs and UNC paths. uxFile = fopen("project/readme.txt", "r") // Fails on Windows winFile = fopen("C:\\Program Files\\bin\\config.bat", "r") // Fails on Unix In Java, the field stores the system-dependent separator. Some functions preclude the need for the separator entirely. import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; // ... File file = new File("path" + File.separator + "file.txt"); Path path = Paths.get("path", "file.txt"); In Python, the module offers system-independent path operations. from pathlib import Path with (Path("path") / "to" / "file.txt").open() as open_file: ... PS C:\>Get-Content -Path "C:/path/to/file.txt" Here is some text within a file
References
- ^ RSX-11M-PLUS MCR Operations Manual, RSX-11M-PLUS Version 4.0 (PDF) . Digital Equipment Corporation . August 1987. 2.2 File Specifications. AA-JS12A-TC. Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ In order, the fields are ddnn:[g,m]:filename.type;version Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Herkert, Mark Klause Herman; Smith, Sheri Lynn (December 1985). Defense Data Network/TOPS-20 Tutorial. An Interactive Computer Program (PDF) (Technical report). Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Rabe, Bernhard (6 June 2011). "OpenVMS & DCL on Alpha & VAX" (PDF) . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "VSI OpenVMS User's Manual" (PDF) . VMS Software . 2025 . Retrieved 7 September 2025 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ ProDOS User's Manual . Apple Computer . 1983. pp. 56– 62. Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ The AmigaDOS Manual . Produced by Commodore-Amiga, Inc. Bantam Computer Books. February 1986. pp. 6– 16. ISBN 978-0-553-34294-9 . {{ cite book }} : CS1 maint: others ( link ) Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "RISC OS PRMs: Volume 2: Chapter 44: Writing a filing system" . www.riscos.com Technical Support: Programmer's Reference Manual . 3QD Developments Ltd. 3 November 2015 . Retrieved 7 September 2025 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ & , % , and @ can also be used to reference the root of the current user, the library, and the current directory respectively Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ When filesystems with filename extensions are mounted, . characters are changed to / , as in the Japan/gif example above Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Getting Started with Domain/OS (PDF) . Apollo Computer . May 1988. pp. 7-1 – 7-7 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Short for Tandem Advanced Command Language Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ CP/M Operating System Manual (3rd ed.). Digital Research . September 1983. Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ [prefix] may be a number (0–31), * (boot volume) or @ (AppleShare home directory) Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "Introduction to the Shell" . GitHub . OpenAtom OpenHarmony . Retrieved 13 March 2024 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "exec" . GitHub . OpenAtom OpenHarmony . Retrieved 14 March 2024 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "Java Development Kit Version 17 API Specification" . docs.oracle.com . Retrieved 7 September 2025 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "pathlib — Object-oriented filesystem paths" . Python . Retrieved 7 October 2026 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "UNC Definition" . ComputerLanguage.com . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "POSIX pathname resolution specification" . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "POSIX pathname definition" . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Chan, Alex (1 December 2021). "A tale of two path separators" . alexwlchan.net . Retrieved 7 September 2025 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Ashcraft, Alvin (16 July 2024). "Maximum Path Length Limitation - Win32 apps" . learn.microsoft.com . Retrieved 7 September 2025 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Wheeler, Sean. "about_Path_Syntax - PowerShell" . learn.microsoft.com . Retrieved 7 September 2025 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "When is a backslash not a backslash?" . Sorting it all Out . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "DavGetHTTPFromUNCPath function" . WebDAV: Windows. Microsoft Docs . series. 13 October 2021 . Retrieved 4 October 2023 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Daley, R.C.; Neumann, P.G. (1965). "A general-purpose file system for secondary storage". Proceedings of the November 30--December 1, 1965, fall joint computer conference, Part I on XX - AFIPS '65 (Fall, part I) . Vol. Part I. pp. 213– 229. doi : 10.1145/1463891.1463915 . S2CID 16236414 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "Why Windows Uses Backslashes and Everything else Uses Forward Slashes" . 10 February 2014. Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "Why is the DOS path character "\"?" . 24 June 2005. Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "File System Basics" . developer.apple.com . 9 April 2018 . Retrieved 7 September 2025 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ "UNC Network Share Access (Windows)" . www.ibm.com . Retrieved 7 September 2025 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ a b "File system formats available in Disk Utility on Mac" . Apple Support . Retrieved 12 September 2025 . Includes a description of APFS , the default file system for macOS Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ a b c Matt Wojciakowski. "Case Sensitivity" . learn.microsoft.com . Retrieved 12 September 2025 . Windows file system treats file and directory names as case-insensitive. FOO.txt and foo.txt will be treated as equivalent files. Linux file system treats file and directory names as case-sensitive. FOO.txt and foo.txt will be treated as distinct files. Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ a b Day, Brittany. "Understanding the Linux Filesystem Case Sensitivity Debate" . Linux Security . Retrieved 12 September 2025 . Case sensitivity in Linux refers to files and directories recognizing differences between lowercase and uppercase characters in filenames. For instance, "File.txt" and "file.txt" would both be treated as two distinct files. This concept is integral to Unix-like operating systems, including Linux. Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ a b De George, Andy (14 December 2022). "File path formats on Windows systems" . Microsoft Docs . Retrieved 14 July 2019 . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ a b Sanches, Wilfredo (2000). "The Challenges of Integrating the Unix and Mac OS Environments" . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ Ashcraft, Alvin (28 August 2024). "Naming Files, Paths, and Namespaces" . Microsoft Docs . Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- ^ a b Limited compatibility, may not work in all Windows programs Wikipedia revision 1378833930, retrieved 2026-11-22 · 1795302000.0
- File system formats available in Disk Utility on Mac . · 1791241200.0
- Rabe, Bernhard. OpenVMS & DCL on Alpha & VAX . 2011-06-06. · 1791241200.0
- VSI OpenVMS User's Manual . VMS Software . 2025. retrieved 2025-09-07 · 1757199600.0
- RISC OS PRMs: Volume 2: Chapter 44: Writing a filing system . · 1791241200.0
- Getting Started with Domain/OS . · 1791241200.0
- Introduction to the Shell . Gi . retrieved 13 March 2024 · 1791241200.0
- exec . GitHub . retrieved 14 March 2024 · 1791241200.0
- For instance, this C code is system-dependent and may fail on opposing systems: uxFile = fopen("project/readme.txt", "r") // Fails on Windows winFile = fopen("C:\\Program Files\\bin\\config.bat" . · 1791241200.0
- pathlib — Object-oriented filesystem paths . Python . retrieved 7 October 2026 · 1791241200.0
- UNC Definition . ComputerLanguage.com . · 1791241200.0
- POSIX pathname resolution specification . · 1791241200.0
- Matt Wojciakowski. Case Sensitivity . learn.microsoft.com . retrieved 2025-09-12 · 1757631600.0
- POSIX pathname definition . · 1791241200.0
- === In macOS === When macOS was being developed, it inherited some pathname choices from Classic Mac OS and the Unix-like NeXTSTEP. The classic Mac OS uses a Code|: while Unix . · 1791241200.0
- Sanches, Wilfredo. The Challenges of Integrating the Unix and Mac OS Environments . 2000. · 1791241200.0
- == In DOS and Windows == File:Dir command in Windows Command Prompt.png|thumb|300px|Screenshot of a Microsoft Windows|Windows Command Prompt (Windows)|Command Prompt shell showing filenames . · 1791241200.0
- Ashcraft, Alvin. Naming Files, Paths, and Namespaces . Microsoft Docs . 2024-08-28. · 1791241200.0
- Maximum Path Length Limitation - Win32 apps . · 1791241200.0
- about_Path_Syntax - PowerShell . · 1791241200.0
- When is a backslash not a backslash? . Sorting it all Out . · 1791241200.0
- Mono|\\ComputerName\SharedFolder\Resource Some Windows interfaces allow or require UNC syntax for WebDAV share access, rather than a URL. The UNC syntax is extended with optional components to . · 1791241200.0
- Understanding the Linux Filesystem Case Sensitivity Debate . · 1791241200.0
Cite this
"Path (computing)". 1791277552. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1378833930