Welcome Guest! Log in

When you want to combine mutliple text files into a one file, the "Concat Files" action is the one you will want to use.

It allows you to concatenate multiple files that fit the mask that you put into "In File Mask" option.



When concatentating your files with this action you might want to keep the header only in the beginning of the output file and the footer at the end.

To achieve that you will have to use the following options :

- "Keep Footer on Last" (activated by default)

- "Keep Header on First" (activated by default)

- "Header Text" or "Header Size"

- "Footer Text" or "Footer Size"


To remove the headers/footers from the source files, Stambia uses the length of the header/footer.

Once the length is known Stambia removes the number of characters corresponding to this value from the begining/end of the file.

This is activated by options "Header Text" or "Header Size" to remove headers and "Footer Text" or "Footer Size" to remove footers.

You can either calculate the number of characters to be removed by yourself and then use "Header Size" and "Footer Size" options or let Stambia calculate it by entering "Header Text" and "Footer Text".

Then if the options "Keep Footer on Last" and "Keep Header on First" are activated the header won't be removed from the first file treated and the footer won't be removed from the last file treated by the action.


It is important to correctly count the charcaters in the line breaks.

For example if your files have the following header :


The header text has 23 characters and the "\n" line break counts as one character.

In the "Header Size" you would have to put 24 characters in this case.


If you prefer to use "Header Text" you would have to put the header text and add one space after to represent the line break, note that if you use "\n" it won't be recognized as one character but as two.



If your files have "\r\n" line breaks you should add 2 additional charcaters (for example two spaces).

If the size calculated is not correct you will have some part of the header left in the output file (for example a line break) or part of the first line of the source files truncated.



# Virginie_Samson 2019-05-10 14:43
# nicolasdohet 2020-02-05 17:12
I'm testing the solution but i lose my header if i use the header size option (stambia S18.3)

You have no rights to post comments


Suggest a new Article!