Summary
In computing, the working directory of a process is a of a , if any, dynamically associated with each process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd function, or just current directory. When the 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. In most computer file systems, every directory has an entry (usually named ".") which points to the directory itself. In most DOS and UNIX command shells, as well as in the Microsoft Windows command line interpreters cmd.exe and Windows PowerShell, the working directory can be changed by using the CD or CHDIR commands. In Unix shells, the pwd command outputs a full pathname of the working directory; the equivalent command in DOS and Windows is CD or CHDIR without arguments (whereas in Unix, cd used without arguments takes the user back to his/her home directory). The environment variable PWD (in Unix/Linux shells), or the pseudo-environment variables CD (in Windows COMMAND.COM and cmd.exe, but not in OS/2 and DOS), or _CWD, _CWDS, _CWP and _CWPS (under 4DOS, 4OS2, 4NT etc.) can be used in scripts, so that one need not start an external program. Microsoft Windows s have the ability to store the working directory. COMMAND.COM in DR-DOS 7.02 and higher provides ECHOS, a variant of the ECHO command omitting the terminating linefeed. This can be used to create a temporary batchjob storing the working directory in an environment variable like CD for later use, for example: ECHOS SET CD=> SETCD.BAT CHDIR >> SETCD.BAT CALL SETCD.BAT DEL SETCD.BAT Alternatively, under Multiuser DOS and DR-DOS 7.02 and higher, various internal and external commands support a parameter /B (for "Batch").
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related courses (14)
CS-438: Decentralized systems engineering
A decentralized system is one that works when no single party is in charge or fully trusted. This course teaches decentralized systems principles while guiding students through the engineering of thei
ENG-270: Computational methods and tools
This course prepares students to use modern computational methods and tools for solving problems in engineering and science.
ME-213: Programmation pour ingénieur
Mettre en pratique les bases de la programmation vues au semestre précédent. Développer un logiciel structuré. Méthode de debug d'un logiciel. Introduction à la programmation scientifique. Introductio
Show more
Related publications (10)
Related concepts (17)
File system
In computing, a file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one large body of data with no way to tell where one piece of data stopped and the next began, or where any piece of data was located when it was time to retrieve it. By separating the data into pieces and giving each piece a name, the data are easily isolated and identified.
Cd (command)
The command, also known as (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and s. The command has been implemented in operating systems such as Unix, DOS, IBM OS/2, MetaComCo TRIPOS, AmigaOS (where if a bare path is given, cd is implied), Microsoft Windows, ReactOS, and Linux. On MS-DOS, it is available in versions 2 and later. DR DOS 6.0 also includes an implementation of the and commands.
Directory (computing)
In computing, a directory is a cataloging structure which contains references to other s, and possibly other directories. On many computers, directories are known as folders, or drawers, analogous to a workbench or the traditional office filing cabinet. The name derives from books like a telephone directory that lists the phone numbers of all the people living in a certain area. Files are organized by storing related files in the same directory.
Show more
Related MOOCs (2)
MATLAB and Octave for Beginners
Learn MATLAB and Octave and start experimenting with matrix manipulations, data visualizations, functions and mathematical computations.
MATLAB and Octave for Beginners
Learn MATLAB and Octave and start experimenting with matrix manipulations, data visualizations, functions and mathematical computations.