TextConverter

Merge multiple Text Files

If we want to stick several text files together to create one united file from the individual files, we could go the difficult way: We could open each individual text file one after the other in an editor, we could copy each content of each of the files individually, in order to insert them into a new file among each other. For a few files, this might be practical, but what if we had to do this task for very many files?

In this tutorial, we therefore show you an easy way, how you can concatenate any number of files without any problems and without much effort. We use the TextConverter for that task, with which you are also able to simultaneously edit the files as required. The program supports all types of text files, so you can use this tutorial for text files with any text as well as, for example, for CSV files or other formats that can be lined up.

General Procedure

Before we go into detail, we would first like to look at the general procedure how you can hang together files with the TextConverter:

That's it. These 3 simple steps are sufficient to put together any number of files with the TextConverter.

Let's now look at the details and the other options with which you can influence the result:

Order of the Files

It is crucial for a satisfactory result that the files are hung together in the correct order. The order of the combined files always corresponds to the order of the files in the file list. This means that you should make sure that the files are assembled in the correct order in the file list before connecting them.

You can either add the files directly to the file list in your desired order or you can change the order of the files in the list after adding. Single files can be moved with the mouse to another position in the list. The order of all files can easily be changed by clicking on a column heading. This allows you to sort the files according to their name, their size or by other criteria in order to use this order directly for your junction.

Options for the Junction

The following options for the concatenation of the files are available. You can easily activate or deactivate them via the checkboxes:

Application of other Actions

The action "Join Files" can be combined with any other actions from the TextConverter. This includes, for example, actions for text processing, actions for line editing or actions for CSV editing. With the options "Perform actions before merging the files for each file individually" as well as "Perform actions after merging the files", you can determine whether these other actions should be carried out as a first step before the combination of the files on the individual files and/or after the joining on the resulting united file.

This option is particularly important for actions that relate either to a specific character position in the text or to a specific line (defined by a line number) in the text. That is because, the character positions and the line numbers change by merging the files. For example, if you activate a line action that should be applied in the first line, before the merging, each individual file has a line number 1. However, after the joining, only the line numbers of the first file match the line numbers of the original files. All other files can only be addressed via an ongoing line number. Depending on which goal you have, it can therefore be better to carry out the actions either before or after merging.

Of course, the function for interconnecting files can also be used alone and does not have to be combined with any other actions. Perhaps it is also sometimes and depending on the task a good idea for you to edit the files before or after joining in a separate step with the TextConverter instead of doing everything at once.

Insert Line Breaks or Text before, between and behind the Files

When connecting and combining files, inevitably the question arises whether the beginning of a new file in the row fits seamlessly to the end of the previous file. In the worst case, a file ends with a word that should not be connected to the first word of the next file. In order to prevent such problems, the TextConverter provides the option of inserting an arbitrary text between the individual files so that the transition succeeds smoothly. In addition, other texts that can differ from the intermediate text can be defined, which are written in front of or behind the series of files.

To only insert a simple line break between the files, you can simply activate the option "Insert line break between the files" with one click. If it should become more individual, you can use the three options "Insert text before the files", "Insert text between the files" and "Insert text behind the files". These provide the possibility of defining three texts for the beginning, for the end and as a gap filler between the files. The texts may also have multiple lines, so you can also use the corresponding text boxes to write one or more line breaks between the files by simply writing line breaks into the respective box. The text for the begin is only used once at the beginning. The text for the end is also only used once for the ending. The text for between the files is used several times, between all 2 files, so the number depends on the number of files that are to be put together. For two files, the text is used once between the two files, for three files twice between the first and the second and between the second and the third file and so on.

If you want to write a text before, between or behind the files, the wide range of placeholders provided by the TextConverter, can also be interesting for you. For example, you can avail yourself of the offering of the placeholders for the file name. If you write, for example, the placeholder %filename% or %name% into the corresponding text fields, perhaps combined with a few line breaks above or below, you can insert the file name with file path (%filename%) or without file path (%name%) before and between the files and thus mark, from which original file the upcoming text comes from. With the placeholders for numbering files, you can also number your merged files. For example, with "%num%/%abs%" you can insert the number of the file in the file list (%num%) as well as the absolute number of files in the file list (%abs%). Of course, these are only examples, the placeholders can of course also be combined with each other or used together with any other characters.

Split a Text File into several new Text Files

The opposite of the fusion of multiple text files for creating one single new file out of the single files is the splitting of one text file into several new individual files. This function can also be carried out with the TextConverter. You can find out how that works in the tutorial about dividing a text file into several new text files.