Concatenate Files (command-line version)

Start a command prompt, navigate to the MARC Report installation folder, then type 'mconcat'.

If the program utilities are installed, you will see the following:

C:\program files\tmq\marc report>mconcat
mconcat 1.1: commandline Concatenate File utility, ⌐2011-2014, TMQ, Inc.
Command-line parameters:
--help        show this parameter list
--source      file(s) to be concatenated; use CSV format if more than one
--target      the file to which the source file(s) will be added
--hide        suppress windows progress bar
--version     display the program version

Usage:

mconcat --source="file 1.mrc","file 2.mrc" --target="2 files.mrc" --hide

NB.: Do not use blanks after the commas in the source list

The instructions are simple enough. The program requires a list of one or more source files, and one target file. Each source file will be appended to the end of the target file in the order that it is entered. If the target file does not exist when the program begins, it will be created.

This utility works on any type of file, as it performs a raw or binary concatenation. However, when running on files of MARC records, the program has the added advantage of printing the total number of MARC records concatenated when it is finished.

All filenames should be quoted; the purpose of this is to prevent blank spaces in filenames from generating unwanted command-line parameters.

Multiple sourcefiles should be separated by a single comma. Again, do not format the list of files using blank spaces after the commas.

To summarise this point, the following syntax is good:

--source="my first file.mrc","my second file.mrc","my third file.mrc"

And the following syntax is bad:

--source="my first file.mrc", "my second file.mrc", "my third file.mrc"

The reason for repeating/belaboring this point is that in the second case, the program will discard the second and third filenames without generating an error (because that is how it handles unrecognized parameters), and thus the result will be a target that contains only “my first file.mrc”

help/concatenate_files.txt · Last modified: 2021/12/29 16:21 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki