forked from Cinchoo/ChoEazyCopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChoAppSettings.cs
1507 lines (1349 loc) · 52.8 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;
#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,
}
[ChoNameValueConfigurationSection("applicationSettings" /*, BindingMode = ChoConfigurationBindingMode.OneWayToSource */, Silent = false)]
public class ChoAppSettings : ChoConfigurableObject
{
#region Instance Data Members (Others)
private int _maxStatusMsgSize;
[Browsable(false)]
[ChoPropertyInfo("maxStatusMsgSize", DefaultValue = "1000")]
public int MaxStatusMsgSize
{
get { return _maxStatusMsgSize; }
set
{
if (value > 0)
_maxStatusMsgSize = value;
}
}
[Browsable(false)]
[ChoPropertyInfo("sourceDirectory")]
public string SourceDirectory
{
get;
set;
}
[Browsable(false)]
[ChoPropertyInfo("destDirectory")]
public string DestDirectory
{
get;
set;
}
#endregion Instance Data Members (Others)
#region Instance Data Members (Common Options)
[Category("1. Common Options")]
[Description("RoboCopy file path.")]
[DisplayName("RoboCopyFilePath")]
[ChoPropertyInfo("roboCopyFilePath", DefaultValue = "RoboCopy.exe")]
public string RoboCopyFilePath
{
get;
set;
}
[Category("1. Common Options")]
[Description("File(s) to copy (names/wildcards: default is \"*.*\").")]
[DisplayName("Files")]
[ChoPropertyInfo("files", DefaultValue = "*.*")]
public string Files
{
get;
set;
}
[Category("1. Common Options")]
[Description("Additional command line parameters (Optional).")]
[DisplayName("AdditionalParams")]
[ChoPropertyInfo("additionalParams")]
public string AdditionalParams
{
get;
set;
}
[Category("1. Common Options")]
[Description("Specify MS-DOS commands to run before robocopy operations, separated by ; (Optional).")]
[DisplayName("PreCommands")]
[ChoPropertyInfo("precommands")]
public string Precommands
{
get;
set;
}
[Category("1. Common Options")]
[Description("Specify MS-DOS commands to run after robocopy operations, separated by ; (Optional).")]
[DisplayName("Postcommands")]
[ChoPropertyInfo("postcommands")]
public string Postcommands
{
get;
set;
}
#endregion Instance Data Members (Common Options)
#region Instance Data Members (Source Options)
[Category("2. Source Options")]
[Description("Copy subdirectories, but not empty ones. (/S).")]
[DisplayName("CopyNoEmptySubDirectories")]
[ChoPropertyInfo("copyNoEmptySubDirectories")]
public bool CopyNoEmptySubDirectories
{
get;
set;
}
[Category("2. Source Options")]
[Description("Copy subdirectories, including Empty ones. (/E).")]
[DisplayName("CopySubDirectories")]
[ChoPropertyInfo("copySubDirectories", DefaultValue = "true")]
public bool CopySubDirectories
{
get;
set;
}
[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;
set;
}
[Category("2. Source Options")]
[Description("Copy files with security (equivalent to /COPY:DATS). (/SEC).")]
[DisplayName("CopyFilesWithSecurity")]
[ChoPropertyInfo("copyFilesWithSecurity")]
public bool CopyFilesWithSecurity
{
get;
set;
}
[Category("2. Source Options")]
[Description("Copy Directory Timestamps. (/DCOPY:T).")]
[DisplayName("CopyDirTimestamp")]
[ChoPropertyInfo("copyDirTimestamp")]
public bool CopyDirTimestamp
{
get;
set;
}
[Category("2. Source Options")]
[Description("Copy all file info (equivalent to /COPY:DATSOU). (/COPYALL).")]
[DisplayName("CopyFilesWithFileInfo")]
[ChoPropertyInfo("copyFilesWithFileInfo")]
public bool CopyFilesWithFileInfo
{
get;
set;
}
[Category("2. Source Options")]
[Description("Copy no file info (useful with /PURGE). (/NOCOPY).")]
[DisplayName("CopyFilesWithNoFileInfo")]
[ChoPropertyInfo("copyFilesWithNoFileInfo")]
public bool CopyFilesWithNoFileInfo
{
get;
set;
}
[Category("2. Source Options")]
[Description("Copy only files with the Archive attribute set. (/A).")]
[DisplayName("CopyOnlyFilesWithArchiveAttributes")]
[ChoPropertyInfo("copyOnlyFilesWithArchiveAttributes")]
public bool CopyOnlyFilesWithArchiveAttributes
{
get;
set;
}
[Category("2. Source Options")]
[Description("Copy only files with the Archive attribute and reset it. (/M).")]
[DisplayName("CopyOnlyFilesWithArchiveAttributesAndReset")]
[ChoPropertyInfo("copyOnlyFilesWithArchiveAttributesAndReset")]
public bool CopyOnlyFilesWithArchiveAttributesAndReset
{
get;
set;
}
[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;
set;
}
[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;
set;
}
[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;
set;
}
[Category("2. Source Options")]
[Description("assume FAT File Times (2-second granularity). (/FFT).")]
[DisplayName("AssumeFATFileTimes")]
[ChoPropertyInfo("assumeFATFileTimes")]
public bool AssumeFATFileTimes
{
get;
set;
}
[Category("2. Source Options")]
[Description("Turn off very long path (> 256 characters) support. (/256).")]
[DisplayName("TurnOffLongPath")]
[ChoPropertyInfo("turnOffLongPath")]
public bool TurnOffLongPath
{
get;
set;
}
#endregion Instance Data Members (Source Options)
#region Instance Data Members (Destination Options)
[Category("3. Destination Options")]
[Description("Add the given attributes to copied files. (/A+:[RASHCNET]).")]
[DisplayName("AddFileAttributes")]
[ChoPropertyInfo("addFileAttributes")]
[Editor(typeof(FileAttributesEditor), typeof(FileAttributesEditor))]
public string AddFileAttributes
{
get;
set;
}
[Category("3. Destination Options")]
[Description("Remove the given Attributes from copied files. (/A-:[RASHCNET]).")]
[DisplayName("RemoveFileAttributes")]
[ChoPropertyInfo("removeFileAttributes")]
[Editor(typeof(FileAttributesEditor), typeof(FileAttributesEditor))]
public string RemoveFileAttributes
{
get;
set;
}
[Category("3. Destination Options")]
[Description("Create destination files using 8.3 FAT file names only. (/FAT).")]
[DisplayName("CreateFATFileNames")]
[ChoPropertyInfo("createFATFileNames")]
public bool CreateFATFileNames
{
get;
set;
}
[Category("3. Destination Options")]
[Description("Create directory tree and zero-length files only. (/CREATE).")]
[DisplayName("CreateDirTree")]
[ChoPropertyInfo("createDirTree")]
public bool CreateDirTree
{
get;
set;
}
[Category("3. Destination Options")]
[Description("Compensate for one-hour DST time differences. (/DST).")]
[DisplayName("CompensateOneHourDSTTimeDiff")]
[ChoPropertyInfo("compensateOneHourDSTTimeDiff")]
public bool CompensateOneHourDSTTimeDiff
{
get;
set;
}
#endregion Instance Data Members (Destination Options)
#region Instance Data Members (Copy Options)
[Category("4. Copy Options")]
[Description("List only - don't copy, timestamp or delete any files. (/L).")]
[DisplayName("ListOnly")]
[ChoPropertyInfo("listOnly")]
public bool ListOnly
{
get;
set;
}
[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;
set;
}
[Category("4. Copy Options")]
[Description("Copy symbolic links versus the target. (/SL).")]
[DisplayName("CopySymbolicLinks")]
[ChoPropertyInfo("copySymbolicLinks")]
public bool CopySymbolicLinks
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Copy files in restartable mode. (/Z).")]
[DisplayName("CopyFilesRestartableMode")]
[ChoPropertyInfo("copyFilesRestartableMode")]
public bool CopyFilesRestartableMode
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Copy files in Backup mode. (/B).")]
[DisplayName("CopyFilesBackupMode")]
[ChoPropertyInfo("copyFilesBackupMode")]
public bool CopyFilesBackupMode
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Copy using unbuffered I/O (recommended for large files). (/J)")]
[DisplayName("UnbufferredIOCopy")]
[ChoPropertyInfo("unbufferredIOCopy")]
public bool UnbufferredIOCopy
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Copy files without using the Windows Copy Offload mechanism. (/NOOFFLOAD).")]
[DisplayName("CopyWithoutWindowsCopyOffload")]
[ChoPropertyInfo("copyWithoutWindowsCopyOffload")]
public bool CopyWithoutWindowsCopyOffload
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Copy all encrypted files in EFS RAW mode. (/EFSRAW).")]
[DisplayName("EncrptFileEFSRawMode")]
[ChoPropertyInfo("encrptFileEFSRawMode")]
public bool EncrptFileEFSRawMode
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Fix file times on all files, even skipped files. (/TIMFIX).")]
[DisplayName("FixFileTimeOnFiles")]
[ChoPropertyInfo("fixFileTimeOnFiles")]
public bool FixFileTimeOnFiles
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude Older files. (/XO).")]
[DisplayName("ExcludeOlderFiles")]
[ChoPropertyInfo("excludeOlderFiles")]
public bool ExcludeOlderFiles
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude Changed files. (/XC).")]
[DisplayName("ExcludeChangedFiles")]
[ChoPropertyInfo("excludeChangedFiles")]
public bool ExcludeChangedFiles
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude Newer files. (/XN).")]
[DisplayName("ExcludeNewerFiles")]
[ChoPropertyInfo("excludeNewerFiles")]
public bool ExcludeNewerFiles
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude eXtra files and directories. (/XX).")]
[DisplayName("ExcludeExtraFilesAndDirs")]
[ChoPropertyInfo("excludeExtraFilesAndDirs")]
public bool ExcludeExtraFilesAndDirs
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude Files matching given names/paths/wildcards. Separate names with ;. (/XF).")]
[DisplayName("ExcludeFilesWithGivenNames")]
[ChoPropertyInfo("excludeFilesWithGivenNames")]
[Editor(typeof(ChoPropertyGridFilePicker), typeof(ChoPropertyGridFilePicker))]
public string ExcludeFilesWithGivenNames
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude Directories matching given names/paths. Separate names with ;. (/XD).")]
[DisplayName("ExcludeDirsWithGivenNames")]
[ChoPropertyInfo("excludeDirsWithGivenNames")]
[Editor(typeof(ChoPropertyGridFolderPicker), typeof(ChoPropertyGridFolderPicker))]
public string ExcludeDirsWithGivenNames
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Include only files with any of the given Attributes set. (/IA:[RASHCNETO]).")]
[DisplayName("IncludeFilesWithGivenAttributes")]
[ChoPropertyInfo("includeFilesWithGivenAttributes")]
[Editor(typeof(FileSelectionAttributesEditor), typeof(FileSelectionAttributesEditor))]
public string IncludeFilesWithGivenAttributes
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude files with any of the given Attributes set. (/XA:[RASHCNETO]).")]
[DisplayName("ExcludeFilesWithGivenAttributes")]
[ChoPropertyInfo("excludeFilesWithGivenAttributes")]
[Editor(typeof(FileSelectionAttributesEditor), typeof(FileSelectionAttributesEditor))]
public string ExcludeFilesWithGivenAttributes
{
get;
set;
}
[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;
set;
}
[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;
set;
}
[Category("4. Copy Options")]
[Description("Include Tweaked files. (/IT).")]
[DisplayName("IncludeTweakedFiles")]
[ChoPropertyInfo("includeTweakedFiles")]
public bool IncludeTweakedFiles
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude Junction points and symbolic links. (normally included by default). (/XJ).")]
[DisplayName("ExcludeJunctionPoints")]
[ChoPropertyInfo("excludeJunctionPoints")]
public bool ExcludeJunctionPoints
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude Junction points and symbolic links for source directories. (/XJD).")]
[DisplayName("ExcludeJunctionPointsForDirs")]
[ChoPropertyInfo("excludeJunctionPointsForDirs")]
public bool ExcludeJunctionPointsForDirs
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude symbolic links for source files. (/XJF).")]
[DisplayName("ExcludeJunctionPointsForFiles")]
[ChoPropertyInfo("excludeJunctionPointsForFiles")]
public bool ExcludeJunctionPointsForFiles
{
get;
set;
}
[Category("4. Copy Options")]
[Description("MAXimum file size - exclude files bigger than n bytes. (/MAX:n).")]
[DisplayName("ExcludeFilesBiggerThanNBytes")]
[ChoPropertyInfo("excludeFilesBiggerThanNBytes")]
public uint ExcludeFilesBiggerThanNBytes
{
get;
set;
}
[Category("4. Copy Options")]
[Description("MINimum file size - exclude files smaller than n bytes. (/MIN:n).")]
[DisplayName("ExcludeFilesSmallerThanNBytes")]
[ChoPropertyInfo("excludeFilesSmallerThanNBytes")]
public uint ExcludeFilesSmallerThanNBytes
{
get;
set;
}
[Category("4. Copy Options")]
[Description("MAXimum Last Access Date - exclude files unused since n. (/MAXLAD:n).")]
[DisplayName("ExcludeFilesUnusedSinceNDays")]
[ChoPropertyInfo("excludeFilesUnusedSinceNDays")]
public uint ExcludeFilesUnusedSinceNDays
{
get;
set;
}
[Category("4. Copy Options")]
[Description("MINimum Last Access Date - exclude files used since n. (If n < 1900 then n = n days, else n = YYYYMMDD date). (/MINLAD:n).")]
[DisplayName("ExcludeFilesUsedSinceNDays")]
[ChoPropertyInfo("excludeFilesUsedSinceNDays")]
public uint ExcludeFilesUsedSinceNDays
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Mirror a directory tree (equivalent to /E plus /PURGE). (/MIR).")]
[DisplayName("MirrorDirTree")]
[ChoPropertyInfo("mirrorDirTree")]
public bool MirrorDirTree
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Delete dest files/dirs that no longer exist in source. (/PURGE).")]
[DisplayName("DelDestFileDirIfNotExistsInSource")]
[ChoPropertyInfo("delDestFileDirIfNotExistsInSource")]
public bool DelDestFileDirIfNotExistsInSource
{
get;
set;
}
[Category("4. Copy Options")]
[Description("eXclude Lonely files and directories. (/XL).")]
[DisplayName("ExcludeLonelyFilesAndDirs")]
[ChoPropertyInfo("excludeLonelyFilesAndDirs")]
public bool ExcludeLonelyFilesAndDirs
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Fix file security on all files, even skipped files. (/SECFIX).")]
[DisplayName("FixFileSecurityOnFiles")]
[ChoPropertyInfo("fixFileSecurityOnFiles")]
public bool FixFileSecurityOnFiles
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Use restartable mode; if access denied use Backup mode. (/ZB).")]
[DisplayName("FallbackCopyFilesMode")]
[ChoPropertyInfo("fallbackCopyFilesMode")]
public bool FallbackCopyFilesMode
{
get;
set;
}
[Category("4. Copy Options")]
[Description("Inter-Packet Gap (ms), to free bandwidth on slow lines. (/IPG:n).")]
[DisplayName("InterPacketGapInMS")]
[ChoPropertyInfo("interPacketGapInMS")]
public uint InterPacketGapInMS
{
get;
set;
}
private uint _multithreadCopy;
[Category("4. Copy Options")]
[Description("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. (/MT[:n]).")]
[DisplayName("MultithreadCopy")]
[ChoPropertyInfo("multithreadCopy")]
public uint MultithreadCopy
{
get { return _multithreadCopy; }
set
{
if (value < 1 || value > 128)
_multithreadCopy = 0;
else
_multithreadCopy = value;
}
}
[Category("4. Copy Options")]
[Description("COPY NO directory info (by default /DCOPY:DA is done). (/NODCOPY).")]
[DisplayName("CopyNODirInfo")]
[ChoPropertyInfo("copyNODirInfo")]
public bool CopyNODirInfo
{
get;
set;
}
#endregion Instance Data Members (Copy Options)
#region Instance Data Members (Monitoring Options)
const string DefaultNoOfRetries = "1000000";
[Category("5. Monitoring Options")]
[Description("Number of Retries on failed copies: default 1 million. (/R:n).")]
[DisplayName("NoOfRetries")]
[ChoPropertyInfo("noOfRetries", DefaultValue = DefaultNoOfRetries)]
public uint NoOfRetries
{
get;
set;
}
const string DefaultWaitTimeBetweenRetries = "30";
[Category("5. Monitoring Options")]
[Description("Wait time between retries: default is 30 seconds. (/W:n).")]
[DisplayName("WaitTimeBetweenRetries")]
[ChoPropertyInfo("waitTimeBetweenRetries", DefaultValue = DefaultWaitTimeBetweenRetries)]
public uint WaitTimeBetweenRetries
{
get;
set;
}
[Category("5. Monitoring Options")]
[Description("Save /R:n and /W:n in the Registry as default settings. (/REG).")]
[DisplayName("SaveRetrySettingsToRegistry")]
[ChoPropertyInfo("saveRetrySettingsToRegistry")]
public bool SaveRetrySettingsToRegistry
{
get;
set;
}
[Category("5. Monitoring Options")]
[Description("Wait for sharenames to be defined (retry error 67). (/TBD).")]
[DisplayName("WaitForSharenames")]
[ChoPropertyInfo("waitForSharenames")]
public bool WaitForSharenames
{
get;
set;
}
[Category("5. Monitoring Options")]
[Description("Monitor source; run again when more than n changes seen. (/MON:n).")]
[DisplayName("RunAgainWithNoChangesSeen")]
[ChoPropertyInfo("runAgainWithNoChangesSeen")]
public uint RunAgainWithNoChangesSeen
{
get;
set;
}
[Category("5. Monitoring Options")]
[Description("Monitor source; run again in m minutes time, if changed. (/MOT:m).")]
[DisplayName("RunAgainWithChangesSeenInMin")]
[ChoPropertyInfo("runAgainWithChangesSeenInMin")]
public uint RunAgainWithChangesSeenInMin
{
get;
set;
}
[Category("5. Monitoring Options")]
[Description("Check run hours on a Per File (not per pass) basis. (/PF).")]
[DisplayName("CheckRunHourPerFileBasis")]
[ChoPropertyInfo("checkRunHourPerFileBasis")]
public bool CheckRunHourPerFileBasis
{
get;
set;
}
#endregion Instance Data Members (Monitoring Options)
#region Instance Data Members (Scheduling Options)
private TimeSpan _runHourStartTime;
[Category("6. Scheduling Options")]
[Description("Run Hours StartTime, when new copies may be started after then. (/RH:hhmm-hhmm).")]
[DisplayName("RunHourStartTime")]
[ChoPropertyInfo("runHourStartTime")]
[XmlIgnore]
public TimeSpan RunHourStartTime
{
get { return _runHourStartTime; }
set { _runHourStartTime = value; }
}
[Browsable(false)]
public long RunHourStartTimeTicks
{
get { return _runHourStartTime.Ticks; }
set { _runHourStartTime = new TimeSpan(value); }
}
private TimeSpan _runHourEndTime;
[Category("6. Scheduling Options")]
[Description("Run Hours EndTime, when new copies may be Ended before then. (/RH:hhmm-hhmm).")]
[DisplayName("RunHourEndTime")]
[ChoPropertyInfo("runHourEndTime")]
[XmlIgnore]
public TimeSpan RunHourEndTime
{
get { return _runHourEndTime; }
set { _runHourEndTime = value; }
}
[Browsable(false)]
public long RunHourEndTimeTicks
{
get { return _runHourEndTime.Ticks; }
set { _runHourEndTime = new TimeSpan(value); }
}
#endregion Instance Data Members (Scheduling Options)
#region Instance Data Members (Logging Options)
[Category("7. Logging Options")]
[Description("No Progress - don't display percentage copied. Suppresses the display of progress information. This can be useful when output is redirected to a file. (/NP).")]
[DisplayName("NoProgress")]
[ChoPropertyInfo("noProgress")]
public bool NoProgress
{
get;
set;
}
[Category("7. Logging Options")]
[Description("Display the status output as unicode text. (/unicode).")]
[DisplayName("Unicode")]
[ChoPropertyInfo("unicode")]
public bool Unicode
{
get;
set;
}
[Category("7. Logging Options")]
[Description("Output status to LOG file (overwrite existing log). (/LOG:file).")]
[DisplayName("OutputLogFilePath")]
[ChoPropertyInfo("outputLogFilePath")]
public string OutputLogFilePath
{
get;
set;
}
[Category("7. Logging Options")]
[Description("Output status to LOG file as UNICODE (overwrite existing log). (/UNILOG:file).")]
[DisplayName("UnicodeOutputLogFilePath")]
[ChoPropertyInfo("unicodeOutputLogFilePath")]
public string UnicodeOutputLogFilePath
{
get;
set;
}
[Category("7. Logging Options")]
[Description("Output status to LOG file (append to existing log). (/LOG+:file).")]
[DisplayName("AppendOutputLogFilePath")]
[ChoPropertyInfo("appendOutputLogFilePath")]
public string AppendOutputLogFilePath
{
get;
set;
}
[Category("7. Logging Options")]
[Description("Output status to LOG file as UNICODE (append to existing log). (/UNILOG+:file).")]
[DisplayName("AppendUnicodeOutputLogFilePath")]
[ChoPropertyInfo("appendUnicodeOutputLogFilePath")]
public string AppendUnicodeOutputLogFilePath
{
get;
set;
}
[Category("7. Logging Options")]
[Description("Include source file timestamps in the output. (/TS).")]
[DisplayName("IncludeSourceFileTimestamp")]
[ChoPropertyInfo("includeSourceFileTimestamp")]
public bool IncludeSourceFileTimestamp
{
get;
set;
}
[Category("7. Logging Options")]
[Description("Include Full Pathname of files in the output. (/FP).")]
[DisplayName("IncludeFullPathName")]
[ChoPropertyInfo("includeFullPathName")]
public bool IncludeFullPathName
{
get;
set;
}
[Category("7. Logging Options")]
[Description("No Size - don't log file sizes. (/NS).")]
[DisplayName("NoFileSizeLog")]
[ChoPropertyInfo("noFileSizeLog")]
public bool NoFileSizeLog
{
get;
set;
}
[Category("7. Logging Options")]
[Description("No Class - don't log file classes. (/NC).")]
[DisplayName("NoFileClassLog")]
[ChoPropertyInfo("noFileClassLog")]
public bool NoFileClassLog
{
get;
set;
}
[Category("7. Logging Options")]
[Description("No File List - don't log file names. Hides file names. Failures are still logged though. Any files files deleted or would be deleted if /L was omitted are always logged. (/NFL).")]
[DisplayName("NoFileNameLog")]
[ChoPropertyInfo("noFileNameLog")]
public bool NoFileNameLog
{
get;
set;
}
[Category("7. Logging Options")]
[Description("No Directory List - don't log directory names. Hides output of the directory listing. Full file pathnames are output to more easily track down problematic files. (/NDL).")]
[DisplayName("NoDirListLog")]
[ChoPropertyInfo("noDirListLog")]
public bool NoDirListLog
{
get;
set;
}
//[Category("Logging Options")]