Skip to content
Snippets Groups Projects
Commit 28a46e33 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Make COPY and DCOPY flags for RoboCopy configurable.

Note that they are not included in the example configuration files as
these settings can easily mess up everything and should only be adjusted
with great care.

The default settings are valid on Windows 7 and Server 2012 and were
successfully tested on those versions.

Fixes #11
parent ce80cb58
No related branches found
No related tags found
No related merge requests found
......@@ -117,6 +117,18 @@ namespace ATxCommon.Serializables
/// See the RoboCopy documentation for more details.
public int InterPacketGap { get; set; } = 0;
/// <summary>
/// Setting for the RoboCopy /COPY parameter, valid flags are D=Data, A=Attributes,
/// T=Timestamps, S=Security(ACLs), O=Owner info, U=aUditing info. Default: "DT".
/// </summary>
public string CopyFlags { get; set; } = "DT";
/// <summary>
/// Setting for the RoboCopy /DCOPY parameter, valid flags depend on the version of
/// RoboCopy used and should only be changed with greatest care! Default: "T".
/// </summary>
public string DirectoryCopyFlags { get; set; } = "T";
/// <summary>
/// A list of process names causing transfers to be suspended if running.
/// </summary>
......
......@@ -68,14 +68,10 @@ namespace ATxService
// copyflags :
// D=Data, A=Attributes, T=Timestamps
// S=Security=NTFS ACLs, O=Owner info, U=aUditing info
_roboCommand.CopyOptions.CopyFlags = _config.CopyFlags;
// /SEC :: copy files with security (equivalent to /COPY:DATS)
// _roboCommand.CopyOptions.CopyFilesWithSecurity = true;
// /COPYALL :: copy all file info (equivalent to /COPY:DATSOU)
// _roboCommand.CopyOptions.CopyAll = true;
_roboCommand.CopyOptions.CopyFlags = "DT";
_roboCommand.CopyOptions.DirectoryCopyFlags = "T";
// /DCOPY :: directory copy settings (T=Timestamps)
_roboCommand.CopyOptions.DirectoryCopyFlags = _config.DirectoryCopyFlags;
// select options
_roboCommand.SelectionOptions.ExcludeOlder = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment