2019-03-11 05:50:17 +00:00
|
|
|
# path
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
> 显示或设置可执行文件的搜索路径。
|
2021-10-01 19:28:01 +01:00
|
|
|
> 更多信息:<https://docs.microsoft.com/windows-server/administration/windows-commands/path>.
|
2019-03-11 05:50:17 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 显示当前的路径:
|
2019-03-11 05:50:17 +00:00
|
|
|
|
|
|
|
`path`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 将路径设置为一个或多个以分号分隔的目录:
|
2019-03-11 05:50:17 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
`path {{目录的路径 1[; 目录的路径 2]}}`
|
2019-03-11 05:50:17 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 将新的目录添加到源路径后:
|
2019-03-11 05:50:17 +00:00
|
|
|
|
|
|
|
`path {{目录的路径}};%path%`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 将命令提示符设置为仅搜索当前目录中的可执行文件:
|
2019-03-11 05:50:17 +00:00
|
|
|
|
|
|
|
`path ;`
|