Dpath
| Company type | Command |
|---|---|
| Industry | Computing / Operating systems |
| Headquarters | IBM OS/2, Microsoft Windows |
| Products | File path management command |
In the realm of computing, dpath is a built-in cmd.exe command available on IBM OS/2 and Windows platforms. It facilitates the use of multiple files with the TYPE command and input redirection as if those files reside in the active directory. On Windows systems, this command is both undocumented and considered obsolete. Differing from the append command, dpath communicates to applications which directories to search for files, relying on the programs’ ability to interpret the %DPATH% environment variable. Conversely, append allows file retrieval without requiring program-level awareness.
History
Under DOS, the append command permitted applications to access data files located in designated directories as if they were situated within the current working directory. With the advent of Windows NT, command processor enhancements in cmd.exe rendered append largely unnecessary, though it remains accessible in 32-bit versions of Windows. The functionality depended on the environment variable %DPATH%, which could be adjusted using dpath. In contemporary Windows environments, only dpath remains operational, despite help documentation still referencing append.
Syntax
DPATH pathname [;pathname] [;pathname] [;pathname]...
DPATH
DPATH ;
pathname : drive letter and/or directory path
; : using 'DPATH ;' clears all paths
When executed without arguments, this command lists the directories currently set in %DPATH%. It is also possible to modify %DPATH% directly through environment variable editing. Executing DPATH /? displays help information related to the append command.
Usage
Input redirection example: <syntaxhighlight lang="doscon"> C:\>echo hello>c:\test\in.txt C:\batch>type c:\test\in.txt hello C:\>dir /a /b C:\>set /p var=<in.txt The system cannot find the file specified. C:\>set var Environment variable var not defined C:\>dpath c:\test; C:\>set /p var=<in.txt C:\>set var var=hello </syntaxhighlight> Using TYPE command: <syntaxhighlight lang="doscon"> C:\>echo hello>c:\test\in.txt C:\batch>type c:\test\in.txt hello C:\>dir /a /b C:\>set /p var=<in.txt The system cannot find the file specified. C:\>type in.txt hello </syntaxhighlight>
See also
Further reading
- Peter Dyson, Mastering OS/2 Warp, Sybex, 1995, ISBN 978-0782116632
- Kathy Ivens & Brian Proffit, OS/2 Inside & Out, Osborne McGraw-Hill, 1993, ISBN 978-0078818714
- Barry Nance & Greg Chicares, Using OS/2 2.0, Que Publishing, 1992, ISBN 978-0880228633