Path


Applies To: Windows Server 2008,Windows Vista

Sets the command path in the PATH environment variable (the set of directories used to search for executable files). If used without parameters, path displays the current command path.

For examples of how to use this command, see Examples.

Syntax


Copy Code

path [[<Drive>:]<Path>[;...][;%PATH%]]
path ;

Parameters

Parameter

Description

[<Drive>:]<Path>

Specifies the drive and directory to set in the command path.

;

Separates directories in the command path. If used without other parameters, ; clears the existing command paths from the PATH environment variable and directs Cmd.exe to search only in the current directory.

%PATH%

Appends the command path to the existing set of directories listed in the PATH environment variable.

/?

Displays help at the command prompt.

Remarks

Examples

To search the paths C:\User\Taxes, B:\User\Invest, and B:\Bin for external commands, type:

path c:\user\taxes;b:\user\invest;b:\bin

Additional references

Command-Line Syntax Key