Software:DPATH (Windows NT command)

From HandWiki

DPATH is an internal undocumented and deprecated cmd.exe command that allows you use a set of files with TYPE command and input redirection as if they are in the current directory.

History

In DOS APPEND was command allowed programs to open data files in specified directories as if they were in the current directory. Since Windows NT is not working (as the cmd.exe introduced command processor extensions and APPEND become redundant) despite the executable was still available (and is still available in 32 bit versions of Windows). Anyway, the command relied on %DPATH% environment variable, which can be edited with DPATH command. In the modern Windows installations only DPATH command is working despite the help message still is pointing to APPEND command. [citation needed]

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:[1]

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

With TYPE command:[2]

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

See also

References

External links