Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: PATH
 Description
 Syntax
 Parameters
 Related Command
 Remarks
  Current directory searched first
  Length limit for the PATH command
  Files with the same name, different extensions
  Two or more identical filenames in the PATH
  Specifying multiple directories in PATH command
  Using PATH in your AUTOEXEC.BAT file
 Examples

MS DOS Command: PATH

Reference from Microsoft MS-DOS cmd help

Description

Indicates 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.

Syntax

PATH [[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

[drive:]path Specifies a drive, directory, and any subdirectories to search.
; When used as the only parameter, clears all search-path settings and specifies that MS-DOS is to search only the current directory.

Related Command

For information about setting a search path for data files, see the APPEND command.

Remarks

Current directory searched first

MS-DOS always searches in the current directory first, before it searches directories in the search path.

Length limit for the PATH command

The 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 extensions

You 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 PATH

You 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 command

To specify more than one path for MS-DOS to search, separate entries with a semicolon (;).

Using PATH in your AUTOEXEC.BAT file

If you place the PATH command in your AUTOEXEC.BAT file, MS-DOS automatically initiates the specified search path every time you start your computer.

Examples

The 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 LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Reference 79

Computer

Hardware 249

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2024 Sideway . All rights reserved Disclaimers last modified on 06 September 2019