dpath

{{Cleanup bare URLs|date=August 2022}}

{{lowercase title}}

{{Infobox software

| name = dpath

| logo =

| screenshot =

| screenshot size =

| caption =

| developer = IBM, Microsoft

| released = {{Start date and age|1987|12}}

| latest release version =

| latest release date =

| operating system = OS/2, Windows

| genre = Command

| license =

| website =

}}

In computing, dpath is an internal cmd.exe command on IBM OS/2{{cite web | url=http://jrttest.com/Help/Os2Cmd.Html#DPATH | title=JRT Help - OS/2 Commands }}{{Dead link|date=February 2024 |bot=InternetArchiveBot |fix-attempted=yes }} and Microsoft Windows{{Cite book|author-last=Hill|author-first=Tim|title=Windows NT Shell Scripting|date=1998|publisher=Macmillan Technical Publishing|isbn=978-1578700479|url-access=registration|url=https://archive.org/details/windowsntshellsc0000hill}}https://ss64.com/nt/path.html#dpath that allows using a set of files with the TYPE command and with input redirection as if they are in the current directory. On Windows it is undocumented and deprecated. dpath differs from the append command in the way it operates. dpath informs programs what directories they should search in order to find computer files. It is then up to the applications to recognize %DPATH%. Using the append command on the other side, programs are able to find files without recognizing that the command is in effect.

History

In DOS the append command allows programs to open data files in specified directories as if they were in the current directory. Since Windows NT this is not working as the cmd.exe introduced command processor extensions and append become redundant. Despite this the executable was and is still available in 32-bit versions of Windows. Anyway, the command relied on %DPATH% environment variable, which can be edited with the dpath command. In the modern Windows installations only the dpath command is working despite the help message still is pointing to the append command.{{cite web | url=http://ss64.org/viewtopic.php?id=1876 | title=[Undocumented] Input redirection check DPATH (Page 1) / Windows CMD Shell / SS64 Forum }}{{cite web | url=http://ss64.org/viewtopic.php?id=1875 | title=[Undocumented] New info for Type command, Dpath is not deprecated (Page 1) / Meta / SS64 Forum }}

Syntax

DPATH pathname [;pathname] [;pathname] [;pathname]...

DPATH

DPATH ;

pathname : drive letter and/or folder

; : the command 'DPATH ;' will clear the path

Without parameters the will display the current list of the directories.

Editing %DPATH% environment variable also can be used.

DPATH /? will print the append command help message.

Usage

Input redirection:

C:\>echo hello>c:\test\in.txt

C:\batch>type c:\test\in.txt

hello

C:\>dir /a /b

C:\>set /p var=

The system cannot find the file specified.

C:\>set var

Environment variable var not defined

C:\>dpath c:\test;

C:\>set /p var=

C:\>set var

var=hello

With TYPE command:

C:\>echo hello>c:\test\in.txt

C:\batch>type c:\test\in.txt

hello

C:\>dir /a /b

C:\>set /p var=

The system cannot find the file specified.

C:\>type in.txt

hello

See also

References

{{Reflist}}

Further reading

  • {{cite book|author=Peter Dyson|year=1995|title=Mastering OS/2 Warp|publisher=Sybex|isbn=978-0782116632}}
  • {{cite book|author1=Kathy Ivens|author2=Brian Proffit|year=1993|title=OS/2 Inside & Out|publisher=Osborne McGraw-Hill|isbn=978-0078818714}}
  • {{cite book|author1=Barry Nance|author2=Greg Chicares|year=1992|title=Using OS/2 2.0|publisher=Que Publishing|isbn=978-0880228633|url-access=registration|url=https://archive.org/details/usingos2200000nanc}}