--- title: "Transfer-Files" ---
This is generated from the built in components of BuildMaster 2024.0, and may be different than what you have installed (especially if you have extensions); go to [Gear Icon] -> Administration -> Operations within your BuildMaster instance to see exactly what operations are available.

Copies files from a directory on a source server to a directory on a target server.

Script usage:

Transfer-Files(
	[Include: <@(text)>],
	[Exclude: <@(text)>],
	[FromDirectory: <text>],
	[FromServer: <text>],
	ToDirectory: <text>,
	[ToServer: <text>],
	[DeleteTarget: <true/false>],
	[SetLastModifiedDate: <true/false>],
	[BatchSize: <integer>],
	[Verbose: <true/false>]
);

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

Arguments:

NameFormatScript UsageUsage Notes
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.
Source directory
text
FromDirectory
Value note: "$WorkingDirectory".
Source server
text
FromServer
Value note: "$ServerName".
Target directory
text
ToDirectory
This argument is required.
Target server
text
ToServer
Value note: "Same as source server".
Delete target
true/false
DeleteTarget
When set to true, files in the target directory will be deleted if they are not present in the source directory. If false, files present in the target directory that are not present in the source directory are unmodified.
Set last modified
true/false
SetLastModifiedDate
When true, the modified date on any transferred files will be set to match their source files. Default value is "True".
Batch size
integer
BatchSize
The number of files to transfer in each batch. Default value is "1".
Verbose
true/false
Verbose