forked from Cinchoo/ChoEazyCopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChoAppSettings.cs
2105 lines (1923 loc) · 76.1 KB
/
ChoAppSettings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
namespace ChoEazyCopy
{
#region NameSpaces
using System;
using System.Text;
using System.Collections.Generic;
using Cinchoo.Core.Configuration;
using System.ComponentModel;
using System.Runtime.Remoting.Contexts;
using System.Dynamic;
using Cinchoo.Core.Text.RegularExpressions;
using System.Text.RegularExpressions;
using Cinchoo.Core.Diagnostics;
using Cinchoo.Core;
using System.Diagnostics;
using Cinchoo.Core.Xml.Serialization;
using Cinchoo.Core.IO;
using System.IO;
using System.Xml.Serialization;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
using System.Windows;
using Cinchoo.Core.WPF;
using System.Windows.Data;
using System.Linq;
using System.Collections.ObjectModel;
using System.Windows.Controls;
using System.Windows.Threading;
using System.Runtime.CompilerServices;
using System.Reflection;
#endregion NameSpaces
[Flags]
public enum ChoCopyFlags
{
[Description("D")]
Data,
[Description("A")]
Attributes,
[Description("T")]
Timestamps,
[Description("S")]
SecurityNTFSACLs,
[Description("O")]
OwnerInfo,
[Description("U")]
AuditingInfo
}
public enum ChoFileAttributes
{
[Description("R")]
ReadOnly,
[Description("H")]
Hidden,
[Description("A")]
Archive,
[Description("S")]
System,
[Description("C")]
Compressed,
[Description("N")]
NotContentIndexed,
[Description("E")]
Encrypted,
[Description("T")]
Temporary
}
public enum ChoFileSelectionAttributes
{
[Description("R")]
ReadOnly,
[Description("A")]
Archive,
[Description("S")]
System,
[Description("H")]
Hidden,
[Description("C")]
Compressed,
[Description("N")]
NotContentIndexed,
[Description("E")]
Encrypted,
[Description("T")]
Temporary,
[Description("O")]
Offline
}
public enum ChoFileMoveAttributes
{
[Description("")]
None,
[Description("/MOV")]
MoveFilesOnly,
[Description("/MOVE")]
MoveDirectoriesAndFiles,
}
public abstract class ChoViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void NotifyPropertyChanged([CallerMemberName] string name = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
}
[ChoNameValueConfigurationSection("applicationSettings" /*, BindingMode = ChoConfigurationBindingMode.OneWayToSource */, Silent = false)]
public class ChoAppSettings : ChoViewModelBase, ICloneable<ChoAppSettings> //: ChoConfigurableObject
{
private readonly static XmlSerializer _xmlSerializer = new XmlSerializer(typeof(ChoAppSettings));
private readonly static Dictionary<string, PropertyInfo> _propInfos = new Dictionary<string, PropertyInfo>();
private readonly static Dictionary<PropertyInfo, object> _defaultValues = new Dictionary<PropertyInfo, object>();
private readonly static ChoAppSettings DefaultInstance = new ChoAppSettings();
static ChoAppSettings()
{
ChoPropertyInfoAttribute attr = null;
foreach (var pi in ChoType.GetProperties(typeof(ChoAppSettings)))
{
attr = pi.GetCustomAttributes(false).OfType<ChoPropertyInfoAttribute>().FirstOrDefault();
if (attr != null)
{
_propInfos.Add(pi.Name, pi);
_defaultValues.Add(pi, attr.DefaultValue);
}
}
ChoObject.ResetObject(DefaultInstance);
}
public ChoAppSettings()
{
}
#region Instance Data Members (Others)
private bool _showRoboCopyProgress;
[Browsable(false)]
[ChoPropertyInfo("ShowRoboCopyProgress")]
[XmlIgnore]
public bool ShowRoboCopyProgress
{
get { return _showRoboCopyProgress; }
set
{
if (value)
{
//CopySubDirectories = false;
//CopyFlags = String.Empty;
//MirrorDirTree = true; //MIR = Mirror mode
NoProgress = true; //NP = Don't show progress percentage in log
NoDirListLog = true; // NDL - No directory list log
NoFileClassLog = true; //NC = Don't log file classes (existing, new file, etc.)
PrintByteSizes = true; //BYTES = Show file sizes in bytes
NoJobHeader = true; //NJH = Do not display robocopy job header (JH)
NoJobSummary = true; //NJS = Do not display robocopy job summary (JS)
}
_showRoboCopyProgress = value;
NotifyPropertyChanged();
}
}
private bool _showOutputLineNumbers;
[Browsable(false)]
[ChoPropertyInfo("showOutputLineNumbers")]
public bool ShowOutputLineNumbers
{
get { return _showOutputLineNumbers; }
set
{
_showOutputLineNumbers = value;
NotifyPropertyChanged();
}
}
private int _maxStatusMsgSize;
[Browsable(false)]
[ChoPropertyInfo("maxStatusMsgSize", DefaultValue = "1000")]
public int MaxStatusMsgSize
{
get { return _maxStatusMsgSize; }
set
{
if (value > 0)
{
_maxStatusMsgSize = value;
NotifyPropertyChanged();
}
}
}
string _sourceDirectory;
[Browsable(false)]
[ChoPropertyInfo("sourceDirectory")]
public string SourceDirectory
{
get { return _sourceDirectory; }
set
{
_sourceDirectory = value;
NotifyPropertyChanged();
}
}
string _destDirectory;
[Browsable(false)]
[ChoPropertyInfo("destDirectory")]
public string DestDirectory
{
get { return _destDirectory; }
set
{
_destDirectory = value;
NotifyPropertyChanged();
}
}
#endregion Instance Data Members (Others)
#region Instance Data Members (Common Options)
string _roboCopyFilePath;
[Category("1. Common Options")]
[Description("RoboCopy file path.")]
[DisplayName("RoboCopyFilePath")]
[ChoPropertyInfo("roboCopyFilePath", DefaultValue = "RoboCopy.exe")]
public string RoboCopyFilePath
{
get { return _roboCopyFilePath; }
set
{
_roboCopyFilePath = value;
NotifyPropertyChanged();
}
}
string _files;
[Category("1. Common Options")]
[Description("File(s) to copy (names/wildcards: default is \"*.*\").")]
[DisplayName("Files")]
[ChoPropertyInfo("files", DefaultValue = "*.*")]
public string Files
{
get { return _files; }
set
{
_files = value;
NotifyPropertyChanged();
}
}
string _additionalParams;
[Category("1. Common Options")]
[Description("Additional command line parameters (Optional).")]
[DisplayName("AdditionalParams")]
[ChoPropertyInfo("additionalParams", DefaultValue = "")]
public string AdditionalParams
{
get { return _additionalParams; }
set
{
_additionalParams = value;
NotifyPropertyChanged();
}
}
string _precommands;
[Category("1. Common Options")]
[Description("Specify MS-DOS commands to run before robocopy operations, separated by ; (Optional).")]
[DisplayName("PreCommands")]
[ChoPropertyInfo("precommands", DefaultValue = "")]
[Editor(typeof(ChoMultilineTextBoxEditor), typeof(ChoMultilineTextBoxEditor))]
public string Precommands
{
get { return _precommands; }
set
{
_precommands = value;
NotifyPropertyChanged();
}
}
string _postcommands;
[Category("1. Common Options")]
[Description("Specify MS-DOS commands to run after robocopy operations, separated by ; (Optional).")]
[DisplayName("Postcommands")]
[ChoPropertyInfo("postcommands", DefaultValue = "")]
[Editor(typeof(ChoMultilineTextBoxEditor), typeof(ChoMultilineTextBoxEditor))]
public string Postcommands
{
get { return _postcommands; }
set
{
_postcommands = value;
NotifyPropertyChanged();
}
}
string _comments;
[Category("1. Common Options")]
[Description("Short description of backup task.")]
[DisplayName("Comments")]
[ChoPropertyInfo("comments", DefaultValue = "")]
public string Comments
{
get { return _comments; }
set
{
_comments = value;
NotifyPropertyChanged();
}
}
#endregion Instance Data Members (Common Options)
#region Instance Data Members (Source Options)
bool _copyNoEmptySubDirectories;
[Category("2. Source Options")]
[Description("Copy subdirectories, but not empty ones. (/S).")]
[DisplayName("CopyNoEmptySubDirectories")]
[ChoPropertyInfo("copyNoEmptySubDirectories")]
public bool CopyNoEmptySubDirectories
{
get { return _copyNoEmptySubDirectories; }
set
{
_copyNoEmptySubDirectories = value;
NotifyPropertyChanged();
}
}
bool _copySubDirectories;
[Category("2. Source Options")]
[Description("Copy subdirectories, including Empty ones. (/E).")]
[DisplayName("CopySubDirectories")]
[ChoPropertyInfo("copySubDirectories", DefaultValue = "true")]
public bool CopySubDirectories
{
get { return _copySubDirectories; }
set
{
_copySubDirectories = value;
if (!value) ShowRoboCopyProgress = false;
NotifyPropertyChanged();
}
}
string _copyFlags;
[Category("2. Source Options")]
[Description("What to copy for files (default is /COPY:DAT). (copyflags : D=Data, A=Attributes, T=Timestamps, S=Security=NTFS ACLs, O=Owner info, U=aUditing info). (/COPY:flags).")]
[DisplayName("CopyFlags")]
[ChoPropertyInfo("copyFlags", DefaultValue = "Data,Attributes,Timestamps")]
[Editor(typeof(CopyFlagsEditor), typeof(CopyFlagsEditor))]
public string CopyFlags
{
get { return _copyFlags; }
set
{
_copyFlags = value;
NotifyPropertyChanged();
}
}
bool _copyFilesWithSecurity;
[Category("2. Source Options")]
[Description("Copy files with security (equivalent to /COPY:DATS). (/SEC).")]
[DisplayName("CopyFilesWithSecurity")]
[ChoPropertyInfo("copyFilesWithSecurity")]
public bool CopyFilesWithSecurity
{
get { return _copyFilesWithSecurity; }
set
{
_copyFilesWithSecurity = value;
NotifyPropertyChanged();
}
}
bool _copyDirTimestamp;
[Category("2. Source Options")]
[Description("Copy Directory Timestamps. (/DCOPY:T).")]
[DisplayName("CopyDirTimestamp")]
[ChoPropertyInfo("copyDirTimestamp")]
public bool CopyDirTimestamp
{
get { return _copyDirTimestamp; }
set
{
_copyDirTimestamp = value;
NotifyPropertyChanged();
}
}
bool _copyFilesWithFileInfo;
[Category("2. Source Options")]
[Description("Copy all file info (equivalent to /COPY:DATSOU). (/COPYALL).")]
[DisplayName("CopyFilesWithFileInfo")]
[ChoPropertyInfo("copyFilesWithFileInfo")]
public bool CopyFilesWithFileInfo
{
get { return _copyFilesWithFileInfo; }
set
{
_copyFilesWithFileInfo = value;
NotifyPropertyChanged();
}
}
bool _copyFilesWithNoFileInfo;
[Category("2. Source Options")]
[Description("Copy no file info (useful with /PURGE). (/NOCOPY).")]
[DisplayName("CopyFilesWithNoFileInfo")]
[ChoPropertyInfo("copyFilesWithNoFileInfo")]
public bool CopyFilesWithNoFileInfo
{
get { return _copyFilesWithNoFileInfo; }
set
{
_copyFilesWithNoFileInfo = value;
NotifyPropertyChanged();
}
}
bool _copyOnlyFilesWithArchiveAttributes;
[Category("2. Source Options")]
[Description("Copy only files with the Archive attribute set. (/A).")]
[DisplayName("CopyOnlyFilesWithArchiveAttributes")]
[ChoPropertyInfo("copyOnlyFilesWithArchiveAttributes")]
public bool CopyOnlyFilesWithArchiveAttributes
{
get { return _copyOnlyFilesWithArchiveAttributes; }
set
{
_copyOnlyFilesWithArchiveAttributes = value;
NotifyPropertyChanged();
}
}
bool _copyOnlyFilesWithArchiveAttributesAndReset;
[Category("2. Source Options")]
[Description("Copy only files with the Archive attribute and reset it. (/M).")]
[DisplayName("CopyOnlyFilesWithArchiveAttributesAndReset")]
[ChoPropertyInfo("copyOnlyFilesWithArchiveAttributesAndReset")]
public bool CopyOnlyFilesWithArchiveAttributesAndReset
{
get { return _copyOnlyFilesWithArchiveAttributesAndReset; }
set
{
_copyOnlyFilesWithArchiveAttributesAndReset = value;
NotifyPropertyChanged();
}
}
uint _onlyCopyNLevels;
[Category("2. Source Options")]
[Description("Only copy the top n levels of the source directory tree. 0 - all levels. (/LEV:n).")]
[DisplayName("OnlyCopyNLevels")]
[ChoPropertyInfo("onlyCopyNLevels")]
public uint OnlyCopyNLevels
{
get { return _onlyCopyNLevels; }
set
{
_onlyCopyNLevels = value;
NotifyPropertyChanged();
}
}
uint _excludeFilesOlderThanNDays;
[Category("2. Source Options")]
[Description("MAXimum file AGE - exclude files older than n days/date. (/MAXAGE:n).")]
[DisplayName("ExcludeFilesOlderThanNDays")]
[ChoPropertyInfo("excludeFilesOlderThanNDays")]
public uint ExcludeFilesOlderThanNDays
{
get { return _excludeFilesOlderThanNDays; }
set
{
_excludeFilesOlderThanNDays = value;
NotifyPropertyChanged();
}
}
uint _excludeFilesNewerThanNDays;
[Category("2. Source Options")]
[Description("MINimum file AGE - exclude files newer than n days/date. (/MINAGE:n).")]
[DisplayName("ExcludeFilesNewerThanNDays")]
[ChoPropertyInfo("excludeFilesNewerThanNDays")]
public uint ExcludeFilesNewerThanNDays
{
get { return _excludeFilesNewerThanNDays; }
set
{
_excludeFilesNewerThanNDays = value;
NotifyPropertyChanged();
}
}
bool _assumeFATFileTimes;
[Category("2. Source Options")]
[Description("assume FAT File Times (2-second granularity). (/FFT).")]
[DisplayName("AssumeFATFileTimes")]
[ChoPropertyInfo("assumeFATFileTimes")]
public bool AssumeFATFileTimes
{
get { return _assumeFATFileTimes; }
set
{
_assumeFATFileTimes = value;
NotifyPropertyChanged();
}
}
bool _turnOffLongPath;
[Category("2. Source Options")]
[Description("Turn off very long path (> 256 characters) support. (/256).")]
[DisplayName("TurnOffLongPath")]
[ChoPropertyInfo("turnOffLongPath")]
public bool TurnOffLongPath
{
get { return _turnOffLongPath; }
set
{
_turnOffLongPath = value;
NotifyPropertyChanged();
}
}
#endregion Instance Data Members (Source Options)
#region Instance Data Members (Destination Options)
string _addFileAttributes;
[Category("3. Destination Options")]
[Description("Add the given attributes to copied files. (/A+:[RASHCNET]).")]
[DisplayName("AddFileAttributes")]
[ChoPropertyInfo("addFileAttributes", DefaultValue = "")]
[Editor(typeof(FileAttributesEditor), typeof(FileAttributesEditor))]
public string AddFileAttributes
{
get { return _addFileAttributes; }
set
{
_addFileAttributes = value;
NotifyPropertyChanged();
}
}
string _removeFileAttributes;
[Category("3. Destination Options")]
[Description("Remove the given Attributes from copied files. (/A-:[RASHCNET]).")]
[DisplayName("RemoveFileAttributes")]
[ChoPropertyInfo("removeFileAttributes", DefaultValue = "")]
[Editor(typeof(FileAttributesEditor), typeof(FileAttributesEditor))]
public string RemoveFileAttributes
{
get { return _removeFileAttributes; }
set
{
_removeFileAttributes = value;
NotifyPropertyChanged();
}
}
bool _createFATFileNames;
[Category("3. Destination Options")]
[Description("Create destination files using 8.3 FAT file names only. (/FAT).")]
[DisplayName("CreateFATFileNames")]
[ChoPropertyInfo("createFATFileNames")]
public bool CreateFATFileNames
{
get { return _createFATFileNames; }
set
{
_createFATFileNames = value;
NotifyPropertyChanged();
}
}
bool _createDirTree;
[Category("3. Destination Options")]
[Description("Create directory tree and zero-length files only. (/CREATE).")]
[DisplayName("CreateDirTree")]
[ChoPropertyInfo("createDirTree")]
public bool CreateDirTree
{
get { return _createDirTree; }
set
{
_createDirTree = value;
NotifyPropertyChanged();
}
}
bool _compensateOneHourDSTTimeDiff;
[Category("3. Destination Options")]
[Description("Compensate for one-hour DST time differences. (/DST).")]
[DisplayName("CompensateOneHourDSTTimeDiff")]
[ChoPropertyInfo("compensateOneHourDSTTimeDiff")]
public bool CompensateOneHourDSTTimeDiff
{
get { return _compensateOneHourDSTTimeDiff; }
set
{
_compensateOneHourDSTTimeDiff = value;
NotifyPropertyChanged();
}
}
#endregion Instance Data Members (Destination Options)
#region Instance Data Members (Copy Options)
bool _listOnly;
[Category("4. Copy Options")]
[Description("List only - don't copy, timestamp or delete any files. (/L).")]
[DisplayName("ListOnly")]
[ChoPropertyInfo("listOnly")]
public bool ListOnly
{
get { return _listOnly; }
set
{
_listOnly = value;
NotifyPropertyChanged();
}
}
string _moveFilesAndDirectories;
[Category("4. Copy Options")]
[Description("Move files and dirs (delete from source after copying). (/MOV or /MOVE).")]
[DisplayName("MoveFilesAndDirectories")]
[ChoPropertyInfo("moveFilesAndDirectories", DefaultValue = "None")]
[Editor(typeof(FileMoveSelectionAttributesEditor), typeof(FileMoveSelectionAttributesEditor))]
public string MoveFilesAndDirectories
{
get { return _moveFilesAndDirectories; }
set
{
_moveFilesAndDirectories = value;
NotifyPropertyChanged();
}
}
internal void SetMoveFilesAndDirectories(string value)
{
_moveFilesAndDirectories = value;
NotifyPropertyChanged(nameof(Comments));
}
bool _copySymbolicLinks;
[Category("4. Copy Options")]
[Description("Copy symbolic links versus the target. (/SL).")]
[DisplayName("CopySymbolicLinks")]
[ChoPropertyInfo("copySymbolicLinks")]
public bool CopySymbolicLinks
{
get { return _copySymbolicLinks; }
set
{
_copySymbolicLinks = value;
NotifyPropertyChanged();
}
}
bool _copyFilesRestartableMode;
[Category("4. Copy Options")]
[Description("Copy files in restartable mode. (/Z).")]
[DisplayName("CopyFilesRestartableMode")]
[ChoPropertyInfo("copyFilesRestartableMode")]
public bool CopyFilesRestartableMode
{
get { return _copyFilesRestartableMode; }
set
{
_copyFilesRestartableMode = value;
NotifyPropertyChanged();
}
}
bool _copyFilesBackupMode;
[Category("4. Copy Options")]
[Description("Copy files in Backup mode. (/B).")]
[DisplayName("CopyFilesBackupMode")]
[ChoPropertyInfo("copyFilesBackupMode")]
public bool CopyFilesBackupMode
{
get { return _copyFilesBackupMode; }
set
{
_copyFilesBackupMode = value;
NotifyPropertyChanged();
}
}
bool _unbufferredIOCopy;
[Category("4. Copy Options")]
[Description("Copy using unbuffered I/O (recommended for large files). (/J)")]
[DisplayName("UnbufferredIOCopy")]
[ChoPropertyInfo("unbufferredIOCopy")]
public bool UnbufferredIOCopy
{
get { return _unbufferredIOCopy; }
set
{
_unbufferredIOCopy = value;
NotifyPropertyChanged();
}
}
bool _copyWithoutWindowsCopyOffload;
[Category("4. Copy Options")]
[Description("Copy files without using the Windows Copy Offload mechanism. (/NOOFFLOAD).")]
[DisplayName("CopyWithoutWindowsCopyOffload")]
[ChoPropertyInfo("copyWithoutWindowsCopyOffload")]
public bool CopyWithoutWindowsCopyOffload
{
get { return _copyWithoutWindowsCopyOffload; }
set
{
_copyWithoutWindowsCopyOffload = value;
NotifyPropertyChanged();
}
}
bool _encrptFileEFSRawMode;
[Category("4. Copy Options")]
[Description("Copy all encrypted files in EFS RAW mode. (/EFSRAW).")]
[DisplayName("EncrptFileEFSRawMode")]
[ChoPropertyInfo("encrptFileEFSRawMode")]
public bool EncrptFileEFSRawMode
{
get { return _encrptFileEFSRawMode; }
set
{
_encrptFileEFSRawMode = value;
NotifyPropertyChanged();
}
}
bool _fixFileTimeOnFiles;
[Category("4. Copy Options")]
[Description("Fix file times on all files, even skipped files. (/TIMFIX).")]
[DisplayName("FixFileTimeOnFiles")]
[ChoPropertyInfo("fixFileTimeOnFiles")]
public bool FixFileTimeOnFiles
{
get { return _fixFileTimeOnFiles; }
set
{
_fixFileTimeOnFiles = value;
NotifyPropertyChanged();
}
}
bool _excludeOlderFiles;
[Category("4. Copy Options")]
[Description("eXclude Older files. (/XO).")]
[DisplayName("ExcludeOlderFiles")]
[ChoPropertyInfo("excludeOlderFiles")]
public bool ExcludeOlderFiles
{
get { return _excludeOlderFiles; }
set
{
_excludeOlderFiles = value;
NotifyPropertyChanged();
}
}
bool _excludeChangedFiles;
[Category("4. Copy Options")]
[Description("eXclude Changed files. (/XC).")]
[DisplayName("ExcludeChangedFiles")]
[ChoPropertyInfo("excludeChangedFiles")]
public bool ExcludeChangedFiles
{
get { return _excludeChangedFiles; }
set
{
_excludeChangedFiles = value;
NotifyPropertyChanged();
}
}
bool _excludeNewerFiles;
[Category("4. Copy Options")]
[Description("eXclude Newer files. (/XN).")]
[DisplayName("ExcludeNewerFiles")]
[ChoPropertyInfo("excludeNewerFiles")]
public bool ExcludeNewerFiles
{
get { return _excludeNewerFiles; }
set
{
_excludeNewerFiles = value;
NotifyPropertyChanged();
}
}
bool _excludeExtraFilesAndDirs;
[Category("4. Copy Options")]
[Description("eXclude eXtra files and directories. (/XX).")]
[DisplayName("ExcludeExtraFilesAndDirs")]
[ChoPropertyInfo("excludeExtraFilesAndDirs")]
public bool ExcludeExtraFilesAndDirs
{
get { return _excludeExtraFilesAndDirs; }
set
{
_excludeExtraFilesAndDirs = value;
NotifyPropertyChanged();
}
}
string _excludeFilesWithGivenNames;
[Category("4. Copy Options")]
[Description("eXclude Files matching given names/paths/wildcards. Separate names with ;. (/XF).")]
[DisplayName("ExcludeFilesWithGivenNames")]
[ChoPropertyInfo("excludeFilesWithGivenNames", DefaultValue = "")]
[Editor(typeof(ChoPropertyGridFilePicker), typeof(ChoPropertyGridFilePicker))]
public string ExcludeFilesWithGivenNames
{
get { return _excludeFilesWithGivenNames; }
set
{
_excludeFilesWithGivenNames = value;
NotifyPropertyChanged();
}
}
string _excludeDirsWithGivenNames;
[Category("4. Copy Options")]
[Description("eXclude Directories matching given names/paths. Separate names with ;. (/XD).")]
[DisplayName("ExcludeDirsWithGivenNames")]
[ChoPropertyInfo("excludeDirsWithGivenNames", DefaultValue = "")]
[Editor(typeof(ChoPropertyGridFolderPicker), typeof(ChoPropertyGridFolderPicker))]
public string ExcludeDirsWithGivenNames
{
get { return _excludeDirsWithGivenNames; }
set
{
_excludeDirsWithGivenNames = value;
NotifyPropertyChanged();
}
}
string _includeFilesWithGivenAttributes;
[Category("4. Copy Options")]
[Description("Include only files with any of the given Attributes set. (/IA:[RASHCNETO]).")]
[DisplayName("IncludeFilesWithGivenAttributes")]
[ChoPropertyInfo("includeFilesWithGivenAttributes", DefaultValue = "")]
[Editor(typeof(FileSelectionAttributesEditor), typeof(FileSelectionAttributesEditor))]
public string IncludeFilesWithGivenAttributes
{
get { return _includeFilesWithGivenAttributes; }
set
{
_includeFilesWithGivenAttributes = value;
NotifyPropertyChanged();
}
}
string _excludeFilesWithGivenAttributes;
[Category("4. Copy Options")]
[Description("eXclude files with any of the given Attributes set. (/XA:[RASHCNETO]).")]
[DisplayName("ExcludeFilesWithGivenAttributes")]
[ChoPropertyInfo("excludeFilesWithGivenAttributes", DefaultValue = "")]
[Editor(typeof(FileSelectionAttributesEditor), typeof(FileSelectionAttributesEditor))]
public string ExcludeFilesWithGivenAttributes
{
get { return _excludeFilesWithGivenAttributes; }
set
{
_excludeFilesWithGivenAttributes = value;
NotifyPropertyChanged();
}
}
bool _overrideModifiedFiles;
[Category("4. Copy Options")]
[Description("Include Modified files (differing change times). Otherwise the same. These files are not copied by default;. (/IM).")]
[DisplayName("OverrideModifiedFiles")]
[ChoPropertyInfo("overrideModifiedFiles")]
public bool OverrideModifiedFiles
{
get { return _overrideModifiedFiles; }
set
{
_overrideModifiedFiles = value;
NotifyPropertyChanged();
}
}
bool _includeSameFiles;
[Category("4. Copy Options")]
[Description("Include Same files. Overwrite files even if they are already the same. (/IS).")]
[DisplayName("IncludeSameFiles")]
[ChoPropertyInfo("includeSameFiles")]
public bool IncludeSameFiles
{
get { return _includeSameFiles; }
set
{
_includeSameFiles = value;
NotifyPropertyChanged();
}
}
bool _includeTweakedFiles;
[Category("4. Copy Options")]
[Description("Include Tweaked files. (/IT).")]
[DisplayName("IncludeTweakedFiles")]
[ChoPropertyInfo("includeTweakedFiles")]
public bool IncludeTweakedFiles
{
get { return _includeTweakedFiles; }
set
{
_includeTweakedFiles = value;
NotifyPropertyChanged();
}
}
bool _excludeJunctionPoints;
[Category("4. Copy Options")]
[Description("eXclude Junction points and symbolic links. (normally included by default). (/XJ).")]
[DisplayName("ExcludeJunctionPoints")]
[ChoPropertyInfo("excludeJunctionPoints")]
public bool ExcludeJunctionPoints
{
get { return _excludeJunctionPoints; }
set
{
_excludeJunctionPoints = value;
NotifyPropertyChanged();
}
}
bool _excludeJunctionPointsForDirs;
[Category("4. Copy Options")]
[Description("eXclude Junction points and symbolic links for source directories. (/XJD).")]
[DisplayName("ExcludeJunctionPointsForDirs")]
[ChoPropertyInfo("excludeJunctionPointsForDirs")]
public bool ExcludeJunctionPointsForDirs
{
get { return _excludeJunctionPointsForDirs; }
set
{
_excludeJunctionPointsForDirs = value;
NotifyPropertyChanged();
}
}
bool _excludeJunctionPointsForFiles;
[Category("4. Copy Options")]
[Description("eXclude symbolic links for source files. (/XJF).")]
[DisplayName("ExcludeJunctionPointsForFiles")]
[ChoPropertyInfo("excludeJunctionPointsForFiles")]
public bool ExcludeJunctionPointsForFiles
{
get { return _excludeJunctionPointsForFiles; }
set
{
_excludeJunctionPointsForFiles = value;
NotifyPropertyChanged();
}
}
uint _excludeFilesBiggerThanNBytes;
[Category("4. Copy Options")]
[Description("MAXimum file size - exclude files bigger than n bytes. (/MAX:n).")]
[DisplayName("ExcludeFilesBiggerThanNBytes")]
[ChoPropertyInfo("excludeFilesBiggerThanNBytes")]
public uint ExcludeFilesBiggerThanNBytes
{
get { return _excludeFilesBiggerThanNBytes; }
set
{
_excludeFilesBiggerThanNBytes = value;
NotifyPropertyChanged();
}
}
uint _excludeFilesSmallerThanNBytes;
[Category("4. Copy Options")]
[Description("MINimum file size - exclude files smaller than n bytes. (/MIN:n).")]
[DisplayName("ExcludeFilesSmallerThanNBytes")]
[ChoPropertyInfo("excludeFilesSmallerThanNBytes")]
public uint ExcludeFilesSmallerThanNBytes
{
get { return _excludeFilesSmallerThanNBytes; }