mconcat is a simple file concatenation utility supplied in the MARC Report utils package. Although this utility will concatenate any type of file, it is MARC-aware and will report accurate record counts for the resulting 'target' file.
The usage notes (which follow) may also be seen by typing 'mconcat' on the windows command-line:
mconcat 1.3: MARC Concatenate File utility, ©2011-2017, TMQ, Inc. Command-line parameters: --help show this parameter list --source=[list] file(s) to be concatenated; use CSV format if more than one --target=[file] the file to which the source file(s) will be added --deleteSource=yes delete source file(s) after they are added to the target --deleteTarget=yes delete the target file before the job is started --hide suppress windows progress bar
mconcat --source="d:\file 1.mrc","d:\file 2.mrc" --target="d:\files 1 and 2.mrc"
Each time the program runs it prints 'mconcat', followed by version information, to the console:
mconcat 1.2: MARC Concatenate File utility, ©2011-2017, TMQ, Inc.
If there are no errors in the parameters, the start of the next non-blank line printed to the console will always contain a number. A positive number indicates success:
660 records added to d:\marc\target
The number 0 probably indicates an error (unless the source file(s) were empty):
0 records concatenated.
The '–deleteSource' and '–deleteTarget' parameters were added in version 1.3. If either is entered without being followed by the value 'yes', the parameter list will be considered invalid, and the job will fail.
LIMITATIONS, CAVEATS, ETC.
Do not add blanks after commas when specifying multiple files in the source file list.
Use fully-qualified paths in filenames, especially on Windows 7 (as due to virtualization, the program may run successfully but the resulting target file may appear to be missing).
Source files that have a size of 0 bytes do not trigger an error.
The target file is never cleared by default. So after running the same command twice–
mconcat --source="d:\file 1.mrc","d:\file 2.mrc" --target="d:\files 1 and 2.mrc" mconcat --source="d:\file 1.mrc","d:\file 2.mrc" --target="d:\files 1 and 2.mrc"
–the target file will contain two copies of each source file, in this order: file 1, file 2, file 1, file 2.