Working directory

In computing, the working directory of a process is a directory of a hierarchical file system, if any,[nb 1] dynamically associated with the process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd[1] function, or just current directory.[2] When a process refers to a file using a simple file name or relative path (as opposed to a file designated by a full path from a root directory), the reference is interpreted relative to the working directory of the process. So for example a process with working directory /rabbit-shoes that asks to create the file foo.txt will end up creating the file /rabbit-shoes/foo.txt.


Cite error: There are <ref group=nb> tags on this page, but the references will not show without a {{reflist|group=nb}} template (see the help page).

  1. ^ Cite error: The named reference getcwd was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference SetCurrentDirectory was invoked but never defined (see the help page).