Draft for Information Only
ContentMS DOS Command: PATH
MS DOS Command: PATHReference from Microsoft MS-DOS cmd help DescriptionIndicates which directories MS-DOS should search for executable files. MS-DOS uses the PATH command to search for executable files in the directories you specify. By default, the search path is the current directory only. SyntaxPATH [[drive:]path[;...]]
To display the current search path, use the following syntax: PATH
To clear all search-path settings other than the default setting (the current directory), use the following syntax: PATH ;
Parameters
Related CommandFor information about setting a search path for data files, see the APPEND command. RemarksCurrent directory searched firstMS-DOS always searches in the current directory first, before it searches directories in the search path. Length limit for the PATH commandThe maximum length of the PATH command is 127 characters. To fit more directories in the search path, you can shorten directory names, use the SUBST command to redirect directories to logical drives (which shortens the entries on the PATH command line), or use the APPEND /X:ON command. Files with the same name, different extensionsYou might have some files in the same directory that share the same filename but have different extensions. For example, you might have a file named ACCNT.COM that starts an accounting program and another file named ACCNT.BAT that connects your system to the accounting system network. MS-DOS searches for a file by using default filename extensions in the following order of precedence: .COM, .EXE, and .BAT. To run ACCNT.BAT when ACCNT.COM exists in the same directory, you must include the .BAT extension on the command line. Two or more identical filenames in the PATHYou might have two or more files in the search path that have the same filename and extension. MS-DOS searches for the specified filename first in the current directory. Then it searches directories in the order in which they are listed in the PATH command. Specifying multiple directories in PATH commandTo specify more than one path for MS-DOS to search, separate entries with a semicolon (;). Using PATH in your AUTOEXEC.BAT fileIf you place the PATH command in your AUTOEXEC.BAT file, MS-DOS automatically initiates the specified search path every time you start your computer. ExamplesThe following command specifies that MS-DOS is to search three directories to find commands (the three paths for these directories are C:\USER\TAXES, B:\USER\INVEST, and B:\BIN): path c:\user\taxes;b:\user\invest;b:\bin ©sideway ID: 110700234 Last Updated: 7/29/2011 Revision: 0 Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019