Path is an environment variable specifying a set of directories where the executable programs (external commands) are searched. When a command is entered by the user, FireCMD command interpreter searches through the path environment variable, examining from left to right in the list looking for a filename that matches the command name. Note that path environment variable is not searched if the command name matches an internal command or an executable file in the current working directory.
Each directory path in the path environment variable is separated by a ';' (semicolon). Note that FireCMD's path environment variable is different from the Windows operating system's %PATH% variable which is used by the cmd.exe (Command Prompt).
Path is also an internal command which can be used to view or manage the path environment variable. It's syntax is as follows:
path [-n | -a [<path_no>] | -d <path_no> | -r <path_value> | -reset]
To view the path environment variable's value you can simply use path command without any arguments. To view a list of directory paths in a proper tabular format with their respective path number you can use the switch -n.
To add a directory path to the path environment variable you can use the following syntax:
path -a [<path_no>]
Using the switch -a opens the Browse For Folder dialog box and allows you to browse and select a directory path. The "path_no" is the place where you want to add the new directory path within the path environment variable. If it is not specified the new directory path is added at the end.
To delete a directory path from the path environment variable you can use the following syntax:
path -d <path_no>
The "path_no" is the place of the directory path which you want to delete within the path environment variable. You can check the "path_no" by using the command path -n.
You can replace the path environment variable's value using the following syntax:
path -r <path_value>
The "path_value" is the new value of the path environment variable. Each directory path should be separated by a semicolon.
You can reset the path environment variable using the following syntax:
path -reset
Specifying the argument -reset reconstructs the path environment variable which also includes the value of the Windows OS's %PATH% variable.