dpath

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
dpath
DevelopersIBM, Microsoft
Initial releaseDecember 1987; 38 years ago (1987-12)
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemOS/2, Windows
    TypeCommand

    In computing, dpath is an internal cmd.exe command on IBM OS/2[1] and Microsoft Windows[2][3] 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

    [edit | edit source]

    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.[4][5]

    Syntax

    [edit | edit source]
         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

    [edit | edit source]

    Input redirection:[4]

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

    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

    [edit | edit source]

    References

    [edit | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).[permanent dead link]
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

    Further reading

    [edit | edit source]
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    [edit | edit source]