Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Concatenate-Files

Concatenates files on a 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:

NameFormatScript UsageUsage Notes
Output file
text
File
This argument is required.
Directory
text
Directory
Value note: "$WorkingDirectory".
Include
@(text)
Include
See KB#1119 to learn more about masking syntax. Value note: "* (top-level items)".
Exclude
@(text)
Exclude
See KB#1119 to learn more about masking syntax.
Encoding
text
Encoding
Value note: "utf8".
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
>>
);