CONCAT
This page was last modified 12:36, 1 June 2020 by Gdx. Based on work by Mars2000you.

Contents

Effect

Merges (concatenates) several source files into an unique destination file.

Requires MSX-DOS 2 / Nextor. To make the same operation under MSX-DOS 1, see COPY.

Note: If this command gives a 'Not enough memory' error then probably reducing the number of buffers (see the BUFFERS command) or removing some environment variables (see the SET command) will free up sufficient memory.

Syntax

CONCAT /S /H /P /A /B /V <SourceDevice>:\<Path>\<SourceFilename> + <SourceDevice>:\<Path>\<SourceFilename>... <DestinationDevice>:\<Path>\<DestinationFilename>

Notes:

  • Character backslash (\) serves as a separator between the folders and the file name in MSX-DOS2. You don't have to put it after the colon of the device name. Backslash is replaced by the character yen (¥) on Japanese MSX or the character won (₩) on Korean MSX.
  • Character slash (/) serves to declare an option. You can put the options after the command or behind all other parameters.

Parameters

<SourceDevice> and <DestinationDevice> are the names for the devices used as source and destination. They can only be disk drives.

If you don't specify the drive, the computer will use the currently active drive (by default, it's drive A:)

Device type Device name Remark
Disk drive A, B, C, D, E, F, G, H A floppy disk interface can control until 2 drives.


<Path> is used to specify the location in folders of file to be used in the merging operation. Each folder name in path are separate by a backslash (\).

<SourceFilename> is the file name to be used as source in the merging operation. Wildcards can replace some characters in filename to get several files. The asterisk (*) and question mark (?) are used as wildcard characters. The asterisk matches any sequence of characters, whereas the question mark matches any single character.

<DestinationFilename> is the file name to be used as destination in the merging operation.

File names are in the format 8 characters followed by a point and an extension with 3 characters. The destination file name can't already be used for another file on the disk inserted in the specified disk drive.

/S is used to accept system files in the merging operation. This parameter is available only since COMMAND2.COM 2.40.

/H is used to accept hidden files in the merging operation.

/P is used to allow a pause at the end of the screen when displaying error messages for files that can't be merged (for example if the destination file name already exists).

/A is used to perform the concatenation in ASCII mode. Source files are read up to the first end-of-file character (CTRL-Z) and a single end-of-file character is appended to the destination after all data has been written out. This parameter can be given globally (at the beginning of the command) or separately for any source file and destination file.

/B is used to perform the concatenation in binary mode. No interpretation is given to the data read and no additional data is added. This parameter can be given globally (at the beginning of the command) or separately for any source file and destination file.

/V is used to turn write verification on for the duration of the CONCAT command (see the VERIFY command). This will ensure that data are written correctly to disks if the device driver being used has the feature, but will slow the operation down for the verification.

Examples

A>CONCAT *.DOC B:\DOC\ALL.PRN
A>CONCAT /H /P *.DOC ALL.DOC
A>CONCAT /B  FILE2.DOC + FILE3.DOC + FILE1.DOC  ALL.DOC

Related to

BUFFERS, COPY, DEL, ERASE, FORMAT, MOVE, RENAME, SET, VERIFY

Compatibility

MSX-DOS 2 / Nextor with COMMAND2.COM v2.20 and higher