PATH
This page was last modified 13:22, 1 June 2020 by Gdx. Based on work by Mars2000you.

Contents

Effect

Displays or sets the search path used by COMMAND2.COM to find a .BAT or .COM file.

The search path is stored as the PATH environment variable and can therefore also be accessed with the SET command.

Syntax

PATH +|- <Device>:\<Path>\ <Device>:\<Path>\ ...

Notes:

  • Character backslash (\) serves as a separator between the folders and the file name in MSX-DOS2. You don't have to put it after the colon of the device name. Backslash is replaced by the character yen (¥) on Japanese MSX or the character won (₩) on Korean MSX.
  • Wildcards can not be used.

Parameters

Without parameter, PATH simply displays the list of all the paths used by COMMAND2.COM to find a .BAT or .COM file, separated by semi-colons (';'). The first displayed ; corresponds to the root directory.

<Device> is the name for used device. It can only be a disk drive.

If you don't specify the drive, the computer will work with the currently active drive (by default, it's drive A:)

Device type Device name Remark
Disk drive A, B, C, D, E, F, G, H A floppy disk interface can control until 2 drives.


<Path> is used to specify the location in folders of folder to be added to the search path or removed from it.

The paths in the current search path will be used by COMMAND2.COM in order from left to right. It is recommended that the paths in the search path are specified as full paths starting at the root directory and with the drive specified. If this is not the case, then the meaning of the search path could change when the current drive or directory is changed.

If you specify one or several folders without using the + or - parameter, the search path will be set to the list of path names given and any existing search path will be deleted.

+ is used to add one or several new paths to the list. Actually each path specified will first be deleted from the currently set search path if it exists, and will then be added onto the end. This allows the order of the paths in the search path to be changed and allows new paths to be appended to the end of the current search path.

The + syntax can also be used to set a search path longer than can be given in one command, the maximum length of the search path being 255 characters and the maximum length of a command 127 characters.

- is used to remove one or several existing paths from the list. Each path in the list will be deleted from the currently set search path, and an error will be given if any of the given paths do not already exist.

Examples

A>PATH
; A:\HELP
A>PATH E:\COM E:\BAT
A>PATH
; E:\COM; E:\BAT
A>PATH + A:\COM A:\BAT
A>PATH - E:\COM E:\BAT

Related to

PATH (Environment Variable), SET

Compatibility

MSX-DOS 2 / Nextor with COMMAND2.COM v2.20 and higher