path (设备可执行文件的搜索路径)

秃噜豆儿 发表于 2020-06-23 17:00
浏览次数:
在手机上阅读

该命令被用于指定MS-DOS在执行命令时应查看的位置。例如,如果要使用“ format ”命令,则必须指定路径,否则您将收到消息“错误的命令或文件名”。

DOS将路径限制为122个字节。每个命令限制为127个字节;但是,127-5(minus 5 because of PATH=)= 122。

DOS limits the path to 122 bytes. Every command is limited to 127 bytes; however, 127 - 5 (minus 5 because of PATH=) = 122.

查看英文版

目录

1 path 运行系统环境

2 path 语法

3 path 示例

path 运行系统环境

Windows 95

Windows 98

Windows xp

Windows vista

Windows 2000

Windows 7

Windows 8

Windows 10

Windows NT

Windows ME

All Versions of MS-DOS

path 语法

显示或设置可执行文件的搜索路径。
PATH [[drive:]path[;...]]
PATH ;
类型PATH; 清除存储在PATH变量中的所有目录名称。此命令将强制Windows仅在当前目录中搜索您运行的命令名称。
Displays or sets a search path for executable files.
PATH [[drive:]path[;...]]
PATH ;
Type PATH ; to clear all directory names stored in your PATH variable. This command will force Windows to search only in the current directory for command names you run.

查看英文版

查看中文版

path 示例

path

单独键入“路径”将显示当前路径信息。以下是使用此命令时可能会收到的输出示例。如下例所示,路径中有多个目录,以分号分隔。

PATH=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x8 6)\WinSCP;C:\
Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS \System32\Wbem;C:\WINDOWS\
System32\WindowsPowerShell\v1.0\;C:\Program Files (x86 )\Windows Live\Shared;C:\Program Files (x86)\FAHClient;
path=c:\windows\command

上面的命令会将路径设置为C:\ windows \ command,这是许多Windows命令所在的位置。

path

Typing "path" by itself shows the current path information. Below is an example of the output you may receive when utilizing this command. As shown in the example below, 

there are multiple directories in the path separated by a semicolon.

PATH=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x8 6)\
WinSCP;C:\Perl\site\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS \System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\
Program Files (x86 )\Windows Live\Shared;C:\Program Files (x86)\FAHClient;
path=c:\windows\command

The command above would set the path to C:\windows\command, which is where many of the Windows commands are located.

查看英文版

查看中文版

其他命令行

pathping | pause | ping | popd | power | print | prompt | pushd |

如此好文,分享给朋友
发表评论
验证码:
评论列表
共0条