Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Path (computing)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Path syntax== <!-- Pathing is more a feature of the file system; not the OS or the shell, but this table focuses on OS and shell :( --> The following table describes the syntax of paths in notable operating systems and with notable aspects by shell. {{Table alignment}} {| class="wikitable col3center col4center col5center col6center" style="font-size:90%;" |- ! Context ! Root<br>dir ! Path<br>delim ! Working<br>dir ! Parent<br>dir ! Home<br>dir ! Examples |- ! [[Unix]] | <code>/</code> | <code>/</code> | <code>.</code> | <code>..</code> | <code>~</code> | <code>/home/user/docs/Letter.txt</code><br><code>./inthisdir</code><br><code>../../greatgrandparent</code><br><code>~/.rcinfo</code> |- ! [[DOS]] [[COMMAND.COM]] | <code>''[drive letter:]''\</code><br>or <code>\\''[server name]''\''[volume]''\</code> | <code>\</code> | <code>.</code> | <code>..</code> | | <code>C:\USER\DOCS\LETTER.TXT</code><br><code>A:PICTURE.JPG</code><br><code>\\SERVER01\USER\DOCS\LETTER.TXT</code> |- ! [[OS/2]] [[cmd.exe]] | <code>''[drive letter:]''\</code><br>or <code>\\''[server name]''\''[volume]''\</code> | <code>/</code><br>or<br><code>\</code> | <code>.</code> | <code>..</code> | | <code>C:\user\docs\Letter.txt</code><br><code>A:Picture.jpg</code><br><code>\\SERVER01\USER\docs\Letter.txt</code> |- ! [[Microsoft Windows|Windows]] [[Command Prompt]] | <span style="white-space:nowrap;"><code>\</code> (relative to current working directory root)</span><br>or <code>''[drive_letter]'':\</code><br>or <code style="white-space:nowrap;">\\''[server]''\''[sharename]''\</code><br>or <code style="white-space:nowrap;">\\?\''[drive_spec]'':\</code><br>or <code style="white-space:nowrap;">\\?\UNC\''[server]''\''[sharename]''\</code><br>or <code style="white-space:nowrap;">\\.\''[physical_device]''\</code><ref name="w32paths">{{cite web |title=Naming Files, Paths, and Namespaces |website=[[Microsoft Docs]] |date=15 December 2022 |url=https://learn.microsoft.com/windows/win32/fileio/naming-a-file}}</ref> | <code>/</code><br>or<br><code>\</code> | <code>.</code> | <code>..</code><ref>{{cite web |title=cd |department=Windows Commands: Windows Server |website=[[Microsoft Docs]] |date=3 February 2023 |url=https://learn.microsoft.com/windows-server/administration/windows-commands/cd |access-date=2023-10-04}}</ref> | | <code>C:\user\docs\Letter.txt</code><br><code>/user/docs/Letter.txt</code><br><code>C:\Letter.txt</code><br><code>\\Server01\user\docs\Letter.txt</code><br><code>\\?\UNC\Server01\user\docs\Letter.txt</code><br><code>\\?\C:\user\docs\Letter.txt</code><br><code><span style="white-space:nowrap;">C:\user\docs\somefile.ext:[[NTFS#Alternate data stream (ADS)|alternate stream name]]</span></code><br><code>./inthisdir</code><br><code>../../greatgrandparent</code><br> |- ! [[Windows]] [[PowerShell]] | <code>''[drive letter:]''/</code><br>or <code>''[drive name:]''\</code><br>or <code>\\''[server name]''\</code><br>or <code>''[PSSnapIn name]''\''[PSProvider name:][:PSDrive root]''</code> | <code>/</code><br>or<br><code>\</code> | <code>.</code> | <code>..</code> | <code>~</code> | <code>C:\user\docs\Letter.txt</code><br><code>C:\user/docs\Letter.txt</code><br><code>\\Server01\user\docs\Letter.txt</code><br><code>cd ~\Desktop</code><br> <code>UserDocs:/Letter.txt</code><br> <code>Variable:PSVersionTable</code><br> <code>Registry::HKEY_LOCAL_MACHINE\SOFTWARE\</code><br> <code>Microsoft.PowerShell.Security\Certificate::CurrentUser\</code> |- ! [[TOPS-20]] [[DIGITAL Command Language|DCL]] | <code>''[device name:]''</code> | <code>.</code> | | | | <code>PS:<USER.DOCS>LETTER.TXT,4</code> |- ! [[RSX-11]] MCR | <code>''[device name:]''</code> | | | | | <code>DR0:[30,12]LETTER.TXT;4</code> |- ! [[OpenVMS]] [[DIGITAL Command Language|DCL]] | <code>''[device name:]''[000000]</code><br>or <code>''[NODE["accountname password"]]''::''[device name]''[000000]:</code> | <code>.</code> | <code>[]</code> | <code>[-]</code> | <small><code>SYS$LOGIN:</code></small> | <code>SYS$SYSDEVICE:[USER.DOCS]PHOTO.JPG</code> <code>[]IN_THIS_DIR.COM;</code><br> <code>[-.-]GreatGrandParent.TXT</code><br> <code>SYS$SYSDEVICE:[.DRAFTS]LETTER.TXT;4</code><br> <code>GEIN::[000000]LETTER.TXT;4</code><br> <code>SYS$LOGIN:LOGIN.COM</code><br> |- ! [[Classic Mac OS|Classic<br>Mac OS]] | <code>''[volume or drive name]'':</code> | <code>:</code> | <code>:</code> | <code>::</code> | | <code>Macintosh HD:Documents:Letter</code><br><code>:fileincurrentdir</code><br><code>::fileinparent</code><br><code>:::fileingrandparent</code> |- ! [[Apple ProDOS|ProDOS]] AppleSoft BASIC | <code>/''[volume or drive name]''/</code> | <code>/</code> | | | | <code>/SCHOOL.DISK/APPLEWORKS/MY.REPORT</code> <code>FLIGHT.SIMULATOR,D2</code> |- ! [[AmigaOS]] Amiga CLI /<br>AmigaShell | <code>''[drive, volume, device, or assign name]:''</code> | <code>/</code> | ''empty<br>string'' | <code>/</code> | | <code>Workbench:Utilities/MultiView</code><br><code>DF0:S/Startup-Sequence</code><br><code>S:Startup-Sequence</code><br><code>TCP:en.wikipedia.com/80</code> |- ! [[RISC OS]] ShellCLI | <code>''[fs type[#option]:][:drive number or disc name.]''$</code> note: &, %, and @ can also be used to reference the root<br>of the current user, the library and the current (working) directory respectively. | <code>.</code> | <code>@</code> | <code>^</code> | <code>&</code> | <code>ADFS::MyDrive.$.Documents.Letter</code><br><code>Net#MainServer::DataDrive.$.Main.sy10823</code><br><code>LanMan::WindowsC.$.Pictures.Japan/gif</code><br><code>NFS:&.!Choices</code><br><code>ADFS:%.IfThere</code><br><code>@.inthisdir</code><br><code>^.^.greatgrandparent</code> When filesystems with filename extensions are mounted,<br>'.' characters are changed to '/', as in the Japan/gif example above. |- ! [[Symbian OS]] File manager | <code>\</code> | <code>\</code> | | | | <code>''\user\docs\Letter.txt''</code> |- ! [[Domain/OS]] Shell | <span style="white-space:nowrap;"><code>//</code> (root of domain)</span><br> <span style="white-space:nowrap;"><code>/</code> (root of current node)</span><br> | <code>/</code> | <code>.</code> | <code>\</code> | <code>~</code> | <code>//node/home/user/docs/Letter.txt</code><br><code>./inthisdir</code><br><code>\\greatgrandparent</code><br><code>~rcinfo</code> |- ! [[MenuetOS]] CMD | <code>/</code> | <code>/</code> | | | | |- ! [[Stratus VOS]] VOS command-line<br>interpreter | <code>%''[system_name]''#''[module_name]''></code> | <code>></code> | | <code><</code> | |<code>%sysname#module1>SubDir>AnotherDir</code> |- ! [[NonStop Kernel|NonStop<br>Kernel]] TACL<br>Tandem Advanced<br>Command Language | No root | <code>.</code> | | ''none'' | | <code>\NODE.$DISK.SUBVOL.FILE</code><br><code>\NODE.$DEVICE</code><br><code>\NODE.$DEVICE.#SUBDEV.QUALIFIER</code> |- ! [[CP/M]] [[Console Command Processor|CCP]] | <code>''[drive letter:]''</code> | colspan="4" | no directory support, just user areas 0βF | align="left" | <code>A:LETTER.TXT</code> |- ! [[Apple GS/OS|GS/OS]] | <code>'':[volume name]:''</code> or <code>''.[device name]:''</code> or <code>''[prefix]:''</code> note: prefix may be a number (0β31), <code>*</code> (boot volume) or <code>@</code> (AppleShare home directory) | <code>:</code><br>or<br><code>/</code> | | | <code>@</code> | <code>:Apps:Platinum.Paint:Platinum.Paint</code><br><code>*:System:Finder</code><br><code>.APPLEDISK3.5B/file</code> |- ![[OpenHarmony]] (incl. [[HarmonyOS]]) exec<ref>{{cite web |title=Introduction to the Shell |website=GitHub |publisher=OpenAtom OpenHarmony |url=https://github.com/eDorUS/OpenHarmony_docs/blob/master/en/device-dev/kernel/kernel-small-debug-shell-overview.md |access-date=13 March 2024}}</ref><ref>{{cite web |title=exec |website=GitHub |publisher=OpenAtom OpenHarmony |url=https://github.com/dashingcalico/OpenHarmony/blob/master/docs-en/kernel/exec.md |access-date=14 March 2024}}</ref> |<code>hb set -root [ROOT_PATH]</code> <code>hb set -p --product [PRODUCT_NAME]</code> |<code>></code> |<code>./</code> |<code>../</code> | |<code>LOCAL>MEDIA_TYPE_>Download>Letter.txt</code> |} Japanese and Korean versions of Windows often display the '[[Β₯]]' character or the '[[Won sign|β©]]' character instead of the directory separator. In such cases the code for a backslash is being drawn as these characters. Very early versions of MS-DOS replaced the backslash with these glyphs on the display to make it possible to display them by programs that only understood 7-bit [[ASCII]] (other characters such as the square brackets were replaced as well, see [[ISO 646]], [https://www.microsoft.com/GLOBALDEV/Reference/dbcs/932.htm Windows Codepage 932 (Japanese Shift JIS)], and [https://www.microsoft.com/GLOBALDEV/Reference/dbcs/949.htm Codepage 949 (Korean)]). Although even the first version of Windows supported the 8-bit [[ISO-8859-1]] character set which has the Yen sign at U+00A5, and modern versions of Windows supports [[Unicode]] which has the Won sign at U+20A9, much software will continue to display backslashes found in ASCII files this way to preserve backward compatibility.<ref>{{cite web |website=Sorting it all Out |title=When is a backslash not a backslash? |url=http://archives.miloush.net/michkap/archive/2005/09/17/469941.html}}</ref> [[macOS]], as a derivative of UNIX, uses UNIX paths internally. However, to preserve compatibility for software and familiarity for users, many portions of the GUI switch "/" typed by the user to ":" internally, and switch them back when displaying filenames (a ":" entered by the user is also changed into "/" but the inverse translation does not happen).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)