Skip to content

Latest commit

 

History

History
150 lines (121 loc) · 2.76 KB

Robocopies.adoc

File metadata and controls

150 lines (121 loc) · 2.76 KB

DSC Resource 'Robocopies'

Robocopies is used to facilitate large file copies with complex requirements such as multithreading, restarts, and exclusions when recursing content.

Source

DSC Resource

Documentation

Table 1. Attributes of category 'Robocopies'
Parameter Attribute DataType Description Allowed Values

Items

Mandatory

Hashtable[]

set of robocopy items

Table 2. Attributes of category 'Robocopies/Items'
Parameter Attribute DataType Description Allowed Values

Source

Mandatory

String

Source Directory, Drive or UNC path.

Destination

Mandatory

String

Destination Dir, Drive or UNC path.

Files

String

File(s) to copy (names/wildcards: default is all files).

Retry

UInt32

Number of Retries on failed copies: default 1 million.

Default: 1000000

Wait

UInt32

Wait time between retries: default is 30 seconds.

Default: 30

SubdirectoriesIncludingEmpty

Boolean

Copy subdirectories, including Empty ones.

  • True

  • False

Restartable

Boolean

Copy files in restartable mode.

  • True

  • False

MultiThreaded

Do multi-threaded copies with n threads (default 8).

N must be at least 1 and not greater than 128. This option is incompatible with the /IPG and /EFSRAW options. Redirect output using /LOG option for better performance.

  • True

  • False

ExcludeFiles

String

Exclude Files matching given names/paths/wildcards.

LogOutput

String

Output status to LOG file.

AppendLog

Boolean

Determine whether to overwrite log file or append.

  • True

  • False

AdditionalArgs

String[]

Use this option to set additional parameters.

Robocopy has MANY configuration options. Too many to present them all as DSC parameters effectively. Each parameter should be a separate array member. This array will be combined with main argument array. For a list of options run Robocopy /??? in a shell window.

Example
Robocopies:
  Items:
  - Source: C:\Test
    Destination: C:\Test2
    MultiThreaded: true
    Restartable: true
    AdditionalArgs: '/mir'