Otter Documentation

files - Concatenate Files

  • Last Modified: 2018-09-21

This is generated from the built-in components of Otter 2.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] > Documentation within your Otter instance to see exactly what operations are available.

Concatenate Files

Concatenates files on a server.

Operation type:

Executing - this operation will perform a specified action or actions on a remote server.

Script usage:

Concatenate-Files(
	File: <text>,
	[Directory: <text>],
	[Include: <@(text)>],
	[Exclude: <@(text)>],
	[Encoding: <text>],
	[Separator: <text>]
);

This operation may be prefixed with Files::, although this is a built-in namespace and isn't really necessary.

Arguments:

Name Format Script Usage Usage Notes
Output file
text
File
This argument is required.
Directory
text
Directory
Include
@(text)
Include
See KB#1119 to learn more about masking syntax.
Exclude
@(text)
Exclude
See KB#1119 to learn more about masking syntax.
Encoding
text
Encoding
Separator
text
Separator

Example:

# concatenates all SQL files in the working directory into a 
# single file, each script separated by a GO statement
Concatenate-Files(
    File: all.sql,
    Include: *.sql,
    Separator: >>
GO
>>
);

Have a question? Try the Q&A Forum

Our documentation is now Open Source and on GitHub. We highly encourage our users to contribute and get involved! .