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.

Transfer-Files

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