Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: APPEND
  Description
  Syntax
  Parameters
  Switches
  Caution
  Related Command
  Remarks
   Running APPEND with Microsoft Windows
   Running APPEND multiple times
   Storing the list of appended directories in the environment
   Specifying multiple appended directories
   Appended directories and the DIR command
   Filename conflicts
   Using APPEND with programs that create new files
   Using the /X:ON switch and the path command
   MS-DOS functions that always use appended directories
   Using APPEND with network drives
  Examples

MS DOS Command: APPEND

Reference from Microsoft MS-DOS cmd help

Description

Enables programs to open data files in specified directories as if the files were in the current directory. Do not use this command when Windows is running.

The specified directories are called appended directories because, for the sake of opening data files, they can be found as if they were appended to the current directory.

Syntax

APPEND [[drive:]path[;...]] [/X[:ON|:OFF]][/PATH:ON|/PATH:OFF] [/E]

To display the list of appended directories, use the following syntax:

APPEND

To cancel the existing list of appended directories, use the following syntax:

APPEND ;

Parameters

[drive:]path Specifies the drive (if other than the current drive) and directory that you want to append to the current directory. You can specify multiple entries of [drive:]path, separating the entries with semicolons.
; When used by itself (APPEND ;), cancels the existing list of appended directories.

Switches

/X[:ON|:OFF] Specifies whether MS-DOS is to search (/X:ON) or not search (/X:OFF) appended directories when executing programs. You can abbreviate /X:ON to /X. If you want to specify X:ON, you must do it the first time you use APPEND after starting your system. After that, you can switch between X:ON and X:OFF. The default value is /X:OFF.
/PATH:ON|/PATH:OFF Specifies whether a program is to search appended directories for a data file when a path is already included with the name of the file the program is looking for. The default setting is /PATH:ON.
/E Assigns the list of appended directories to an environment variable named APPEND. This switch can be used only the first time you use APPEND after starting your system. If you use /E, you can use the SET command to display the list of appended directories. For information about environment variables, see the SET command.

Caution

Do not use Append with Microsoft Windows or the Windows Setup program.

Related Command

To set a search path for executable files, see the PATH command.

Remarks

Running APPEND with Microsoft Windows

Do not use Append with Microsoft Windows or the Windows Setup program.

Running APPEND multiple times

You can use APPEND as many times as you want after starting your system. However, note the following:

*** The /E switch is valid only the first time you use APPEND after starting your system.

*** The second and subsequent times you run APPEND, you must omit the .EXE filename extension. If you try to run APPEND by typing APPEND.EXE, it will not load more than once.

Storing the list of appended directories in the environment

You can use the /E switch with APPEND to assign the list of appended directories to an environment variable named APPEND. To do this, first use the APPEND command with only the /E switch. Then use APPEND again, this time including the directories you want to append. You cannot specify /E and [drive:]path on the same command line.

Specifying multiple appended directories

To append more than one directory, separate multiple entries with semicolons. If you use the APPEND command with the [drive:]path parameters again, the specified directory or directories replace any directories specified in a previous APPEND command.

Appended directories and the DIR command

If you specify the DIR command, the resulting list does not include filenames from appended directories.

Filename conflicts

If a file in an appended directory has the same name as a file in the current directory, programs open the file in the current directory.

Using APPEND with programs that create new files

When a program opens a file in an appended directory, the file can be found as if it were in the current directory. If the program then saves the file by creating a new file with the same name, the new file is created in the current directory (not the appended directory). APPEND is appropriately used for data files that are not to be modified or that are to be modified without creating new copies of the files. Database programs often modify data files without making new copies. Text editors and word processors, however, usually save modified data files by making new copies. To avoid confusion, do not use APPEND with these programs.

Using the /X:ON switch and the path command

When /X:ON is specified, you can run a program located in an appended directory by typing the program name at the command prompt. Usually, you use the PATH command to specify directories that contain programs. However, when your program is in an appended directory, you do not need to use the PATH command to specify that directory. MS-DOS finds a program in an appended directory by following the usual order in which MS-DOS searches for a program; that is, first in the current directory, then in the appended directories, and then in the search path.

MS-DOS functions that always use appended directories

Even when the /X:ON switch is not specified, appended directories are used when programs call the following MS-DOS Interrupt 21h functions:

*** Open File (0Fh)

*** Open File Handle (3Dh)

*** Get File Size (23h)

When /X:ON is specified, appended directories are used when programs call any of the Interrupt 21h functions in the preceding list or any of the Interrupt 21h functions in the following list:

*** Find First Entry (11h)

*** Find First File (4Eh)

*** Execute Program (EXEC) (4Bh)

Using APPEND with network drives

You can use the APPEND command to append directories that are located on network drives.

Examples

To allow programs to open data files in a directory named LETTERS on the disk in drive B and in a directory named REPORTS on the disk in drive A as if the files were in the current directory, type the following command:

append b:\letters;a:\reports

To append the same directories and keep a copy of the list of appended directories in the MS-DOS environment, type the following commands:

append /e

append b:\letters;a:\reports

These must be the first APPEND commands you use after starting your system.


©sideway

ID: 110700128 Last Updated: 7/21/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

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

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-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019