├── .gitignore
├── CopyFolderTool.sln
├── CopyFolderTool
├── App.config
├── App.xaml
├── App.xaml.cs
├── CopyFolderTool.csproj
├── Icon-CopyFolderTool.ico
├── Icon.ico
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── UserSettings.Designer.cs
├── UserSettings.settings
└── packages.config
├── LICENSE
├── README.md
├── _install
├── AddToRightclickMenu.reg
├── RemoveToRightclickMenu.reg
├── install.bat
├── uninstall.bat
└── update.bat
├── icons
└── Icon-CopyFolderTool.ico
└── screenshots
├── header-image.jpg
└── instruction-image.jpg
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Aa][Rr][Mm]/
27 | [Aa][Rr][Mm]64/
28 | bld/
29 | [Bb]in/
30 | [Oo]bj/
31 | [Ll]og/
32 | [Ll]ogs/
33 |
34 | # Visual Studio 2015/2017 cache/options directory
35 | .vs/
36 | # Uncomment if you have tasks that create the project's static files in wwwroot
37 | #wwwroot/
38 |
39 | # Visual Studio 2017 auto generated files
40 | Generated\ Files/
41 |
42 | # MSTest test Results
43 | [Tt]est[Rr]esult*/
44 | [Bb]uild[Ll]og.*
45 |
46 | # NUnit
47 | *.VisualState.xml
48 | TestResult.xml
49 | nunit-*.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # Benchmark Results
57 | BenchmarkDotNet.Artifacts/
58 |
59 | # .NET Core
60 | project.lock.json
61 | project.fragment.lock.json
62 | artifacts/
63 |
64 | # StyleCop
65 | StyleCopReport.xml
66 |
67 | # Files built by Visual Studio
68 | *_i.c
69 | *_p.c
70 | *_h.h
71 | *.ilk
72 | *.meta
73 | *.obj
74 | *.iobj
75 | *.pch
76 | *.pdb
77 | *.ipdb
78 | *.pgc
79 | *.pgd
80 | *.rsp
81 | *.sbr
82 | *.tlb
83 | *.tli
84 | *.tlh
85 | *.tmp
86 | *.tmp_proj
87 | *_wpftmp.csproj
88 | *.log
89 | *.vspscc
90 | *.vssscc
91 | .builds
92 | *.pidb
93 | *.svclog
94 | *.scc
95 |
96 | # Chutzpah Test files
97 | _Chutzpah*
98 |
99 | # Visual C++ cache files
100 | ipch/
101 | *.aps
102 | *.ncb
103 | *.opendb
104 | *.opensdf
105 | *.sdf
106 | *.cachefile
107 | *.VC.db
108 | *.VC.VC.opendb
109 |
110 | # Visual Studio profiler
111 | *.psess
112 | *.vsp
113 | *.vspx
114 | *.sap
115 |
116 | # Visual Studio Trace Files
117 | *.e2e
118 |
119 | # TFS 2012 Local Workspace
120 | $tf/
121 |
122 | # Guidance Automation Toolkit
123 | *.gpState
124 |
125 | # ReSharper is a .NET coding add-in
126 | _ReSharper*/
127 | *.[Rr]e[Ss]harper
128 | *.DotSettings.user
129 |
130 | # TeamCity is a build add-in
131 | _TeamCity*
132 |
133 | # DotCover is a Code Coverage Tool
134 | *.dotCover
135 |
136 | # AxoCover is a Code Coverage Tool
137 | .axoCover/*
138 | !.axoCover/settings.json
139 |
140 | # Visual Studio code coverage results
141 | *.coverage
142 | *.coveragexml
143 |
144 | # NCrunch
145 | _NCrunch_*
146 | .*crunch*.local.xml
147 | nCrunchTemp_*
148 |
149 | # MightyMoose
150 | *.mm.*
151 | AutoTest.Net/
152 |
153 | # Web workbench (sass)
154 | .sass-cache/
155 |
156 | # Installshield output folder
157 | [Ee]xpress/
158 |
159 | # DocProject is a documentation generator add-in
160 | DocProject/buildhelp/
161 | DocProject/Help/*.HxT
162 | DocProject/Help/*.HxC
163 | DocProject/Help/*.hhc
164 | DocProject/Help/*.hhk
165 | DocProject/Help/*.hhp
166 | DocProject/Help/Html2
167 | DocProject/Help/html
168 |
169 | # Click-Once directory
170 | publish/
171 |
172 | # Publish Web Output
173 | *.[Pp]ublish.xml
174 | *.azurePubxml
175 | # Note: Comment the next line if you want to checkin your web deploy settings,
176 | # but database connection strings (with potential passwords) will be unencrypted
177 | *.pubxml
178 | *.publishproj
179 |
180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
181 | # checkin your Azure Web App publish settings, but sensitive information contained
182 | # in these scripts will be unencrypted
183 | PublishScripts/
184 |
185 | # NuGet Packages
186 | *.nupkg
187 | # NuGet Symbol Packages
188 | *.snupkg
189 | # The packages folder can be ignored because of Package Restore
190 | **/[Pp]ackages/*
191 | # except build/, which is used as an MSBuild target.
192 | !**/[Pp]ackages/build/
193 | # Uncomment if necessary however generally it will be regenerated when needed
194 | #!**/[Pp]ackages/repositories.config
195 | # NuGet v3's project.json files produces more ignorable files
196 | *.nuget.props
197 | *.nuget.targets
198 |
199 | # Microsoft Azure Build Output
200 | csx/
201 | *.build.csdef
202 |
203 | # Microsoft Azure Emulator
204 | ecf/
205 | rcf/
206 |
207 | # Windows Store app package directories and files
208 | AppPackages/
209 | BundleArtifacts/
210 | Package.StoreAssociation.xml
211 | _pkginfo.txt
212 | *.appx
213 | *.appxbundle
214 | *.appxupload
215 |
216 | # Visual Studio cache files
217 | # files ending in .cache can be ignored
218 | *.[Cc]ache
219 | # but keep track of directories ending in .cache
220 | !?*.[Cc]ache/
221 |
222 | # Others
223 | ClientBin/
224 | ~$*
225 | *~
226 | *.dbmdl
227 | *.dbproj.schemaview
228 | *.jfm
229 | *.pfx
230 | *.publishsettings
231 | orleans.codegen.cs
232 |
233 | # Including strong name files can present a security risk
234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
235 | #*.snk
236 |
237 | # Since there are multiple workflows, uncomment next line to ignore bower_components
238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
239 | #bower_components/
240 |
241 | # RIA/Silverlight projects
242 | Generated_Code/
243 |
244 | # Backup & report files from converting an old project file
245 | # to a newer Visual Studio version. Backup files are not needed,
246 | # because we have git ;-)
247 | _UpgradeReport_Files/
248 | Backup*/
249 | UpgradeLog*.XML
250 | UpgradeLog*.htm
251 | ServiceFabricBackup/
252 | *.rptproj.bak
253 |
254 | # SQL Server files
255 | *.mdf
256 | *.ldf
257 | *.ndf
258 |
259 | # Business Intelligence projects
260 | *.rdl.data
261 | *.bim.layout
262 | *.bim_*.settings
263 | *.rptproj.rsuser
264 | *- [Bb]ackup.rdl
265 | *- [Bb]ackup ([0-9]).rdl
266 | *- [Bb]ackup ([0-9][0-9]).rdl
267 |
268 | # Microsoft Fakes
269 | FakesAssemblies/
270 |
271 | # GhostDoc plugin setting file
272 | *.GhostDoc.xml
273 |
274 | # Node.js Tools for Visual Studio
275 | .ntvs_analysis.dat
276 | node_modules/
277 |
278 | # Visual Studio 6 build log
279 | *.plg
280 |
281 | # Visual Studio 6 workspace options file
282 | *.opt
283 |
284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
285 | *.vbw
286 |
287 | # Visual Studio LightSwitch build output
288 | **/*.HTMLClient/GeneratedArtifacts
289 | **/*.DesktopClient/GeneratedArtifacts
290 | **/*.DesktopClient/ModelManifest.xml
291 | **/*.Server/GeneratedArtifacts
292 | **/*.Server/ModelManifest.xml
293 | _Pvt_Extensions
294 |
295 | # Paket dependency manager
296 | .paket/paket.exe
297 | paket-files/
298 |
299 | # FAKE - F# Make
300 | .fake/
301 |
302 | # CodeRush personal settings
303 | .cr/personal
304 |
305 | # Python Tools for Visual Studio (PTVS)
306 | __pycache__/
307 | *.pyc
308 |
309 | # Cake - Uncomment if you are using it
310 | # tools/**
311 | # !tools/packages.config
312 |
313 | # Tabs Studio
314 | *.tss
315 |
316 | # Telerik's JustMock configuration file
317 | *.jmconfig
318 |
319 | # BizTalk build output
320 | *.btp.cs
321 | *.btm.cs
322 | *.odx.cs
323 | *.xsd.cs
324 |
325 | # OpenCover UI analysis results
326 | OpenCover/
327 |
328 | # Azure Stream Analytics local run output
329 | ASALocalRun/
330 |
331 | # MSBuild Binary and Structured Log
332 | *.binlog
333 |
334 | # NVidia Nsight GPU debugger configuration file
335 | *.nvuser
336 |
337 | # MFractors (Xamarin productivity tool) working folder
338 | .mfractor/
339 |
340 | # Local History for Visual Studio
341 | .localhistory/
342 |
343 | # BeatPulse healthcheck temp database
344 | healthchecksdb
345 |
346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
347 | MigrationBackup/
348 |
349 | # Ionide (cross platform F# VS Code tools) working folder
350 | .ionide/
351 | _install/Executables/CopyFolderTool.exe
352 | .gitignore
353 | _install/Executables/CopyFolderTool.exe.config
354 | _install/Executables/Microsoft.WindowsAPICodePack.Shell.dll
355 | _install/Executables/Microsoft.WindowsAPICodePack.dll
356 | _install/Executables/Microsoft.WindowsAPICodePack.Shell.xml
357 | _install/Executables/Microsoft.WindowsAPICodePack.xml
358 |
359 |
360 | # General
361 | .DS_Store
362 | .AppleDouble
363 | .LSOverride
364 |
365 | # Thumbnails
366 | ._*
367 |
368 | # Files that might appear in the root of a volume
369 | .DocumentRevisions-V100
370 | .fseventsd
371 | .Spotlight-V100
372 | .TemporaryItems
373 | .Trashes
374 | .VolumeIcon.icns
375 | .com.apple.timemachine.donotpresent
376 |
377 | # Directories potentially created on remote AFP share
378 | .AppleDB
379 | .AppleDesktop
380 | Network Trash Folder
381 | Temporary Items
382 | .apdisk
383 |
--------------------------------------------------------------------------------
/CopyFolderTool.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30804.86
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopyFolderTool", "CopyFolderTool\CopyFolderTool.csproj", "{7D2F494B-181F-4975-A998-6B760B6C2B3E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {7D2F494B-181F-4975-A998-6B760B6C2B3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {7D2F494B-181F-4975-A998-6B760B6C2B3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {7D2F494B-181F-4975-A998-6B760B6C2B3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {7D2F494B-181F-4975-A998-6B760B6C2B3E}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {3ED29094-FBD6-4AC0-B188-CE34ACA8408F}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/CopyFolderTool/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | C:\logs\
15 |
16 |
17 | Backup
18 |
19 |
20 | *.bak
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/CopyFolderTool/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CopyFolderTool/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace CopyFolderTool
10 | {
11 | ///
12 | /// Interaktionslogik für "App.xaml"
13 | ///
14 | public partial class App : Application
15 | {
16 | public static String[] mArgs;
17 | private void Application_Startup(object sender, StartupEventArgs e)
18 | {
19 | if (e.Args.Length > 0)
20 | {
21 | mArgs = e.Args;
22 | }
23 |
24 | MainWindow wnd = new MainWindow();
25 | wnd.Show();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/CopyFolderTool/CopyFolderTool.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {7D2F494B-181F-4975-A998-6B760B6C2B3E}
8 | WinExe
9 | CopyFolderTool
10 | CopyFolderTool
11 | v4.7.2
12 | 512
13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
14 | 4
15 | true
16 | true
17 |
18 |
19 | AnyCPU
20 | true
21 | full
22 | false
23 | bin\Debug\
24 | DEBUG;TRACE
25 | prompt
26 | 4
27 |
28 |
29 | AnyCPU
30 | pdbonly
31 | true
32 | ..\_install\Executables\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 | Icon-CopyFolderTool.ico
39 |
40 |
41 | CopyFolderTool.App
42 |
43 |
44 |
45 | ..\packages\WindowsAPICodePack-Core.1.1.1\lib\Microsoft.WindowsAPICodePack.dll
46 |
47 |
48 | ..\packages\WindowsAPICodePack-Shell.1.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | 4.0
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | MSBuild:Compile
68 | Designer
69 |
70 |
71 | True
72 | True
73 | UserSettings.settings
74 |
75 |
76 | MSBuild:Compile
77 | Designer
78 |
79 |
80 | App.xaml
81 | Code
82 |
83 |
84 | MainWindow.xaml
85 | Code
86 |
87 |
88 |
89 |
90 | Code
91 |
92 |
93 | True
94 | True
95 | Resources.resx
96 |
97 |
98 | True
99 | Settings.settings
100 | True
101 |
102 |
103 | ResXFileCodeGenerator
104 | Resources.Designer.cs
105 |
106 |
107 |
108 | SettingsSingleFileGenerator
109 | Settings.Designer.cs
110 |
111 |
112 | SettingsSingleFileGenerator
113 | UserSettings.Designer.cs
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
--------------------------------------------------------------------------------
/CopyFolderTool/Icon-CopyFolderTool.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/biteworks/CopyFolderTool/9663fe54b188ce08827fb24ca8dfd42f48290003/CopyFolderTool/Icon-CopyFolderTool.ico
--------------------------------------------------------------------------------
/CopyFolderTool/Icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/biteworks/CopyFolderTool/9663fe54b188ce08827fb24ca8dfd42f48290003/CopyFolderTool/Icon.ico
--------------------------------------------------------------------------------
/CopyFolderTool/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
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 | Copy subfolders
36 | Copy only new or changed files
37 | Move files (Source data will be deleted)
38 |
39 |
40 |
41 |
42 | Exclude Folders
43 | (e.g. "Backup, Export, temp")
44 |
45 |
46 |
47 |
48 |
49 |
50 | Exclude files by type
51 | (e.g. "*.jpg, *.bak, *.csv")
52 |
53 |
54 |
55 |
56 |
57 | Shutdown the computer after copying
58 | Create Logfile
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | Version 1.3.0
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/CopyFolderTool/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.WindowsAPICodePack.Dialogs;
2 | using System;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text.RegularExpressions;
6 | using System.Windows;
7 |
8 | namespace CopyFolderTool
9 | {
10 | ///
11 | /// Interaktionslogik für MainWindow.xaml
12 | ///
13 | public partial class MainWindow : Window
14 | {
15 |
16 | public MainWindow()
17 | {
18 | InitializeComponent();
19 |
20 | if (App.mArgs != null && App.mArgs.Length > 0)
21 | {
22 | fieldSource.Text = checkForBackslash(App.mArgs[0]);
23 | }
24 |
25 | loadSettings();
26 | }
27 | private void StartRobocopy(object sender, RoutedEventArgs e)
28 | {
29 | var button = sender as System.Windows.Controls.Button;
30 |
31 | string command;
32 | string sourcePath;
33 | string destinationPath;
34 | string logPath;
35 |
36 | if (String.IsNullOrEmpty(fieldSource.Text) || String.IsNullOrEmpty(fieldDestination.Text))
37 | {
38 | MessageBox.Show("Please enter valid paths!", "Path missing", MessageBoxButton.OK, MessageBoxImage.Error);
39 | return;
40 | }
41 | else
42 | {
43 | sourcePath = checkForBackslash(fieldSource.Text);
44 | destinationPath = checkForBackslash(fieldDestination.Text);
45 | }
46 |
47 | //Optionen
48 | string optionE = "";
49 | string optionXO = "";
50 | string optionMOV = "";
51 | string optionXD = "";
52 | string optionXF = " /XF \"Thumbs. db\" \"desktop.ini\"";
53 | string optionLog = "";
54 | string optionClose = "";
55 | string standardOptions = " /MT:8";
56 |
57 | if (option_E.IsChecked == true)
58 | {
59 | optionE = " /E";
60 | }
61 |
62 | if (option_XO.IsChecked == true)
63 | {
64 | optionXO = " /XO /FFT";
65 | }
66 |
67 | if (option_MOV.IsChecked == true)
68 | {
69 | optionXO = " /MOV";
70 | }
71 |
72 | if (option_XD.IsChecked == true)
73 | {
74 | if(String.IsNullOrEmpty(fieldExcludeFolders.Text))
75 | {
76 | MessageBox.Show("Excluded folder names are missing!", "Folder names missing", MessageBoxButton.OK, MessageBoxImage.Error);
77 | return;
78 | }
79 | else
80 | {
81 | string tempXDStr = fieldExcludeFolders.Text.Replace(" ", "");
82 | string[] tempFolderNames = tempXDStr.Split(',');
83 | optionXD = " /XD";
84 |
85 | foreach (var folderName in tempFolderNames)
86 | {
87 | optionXD += " \"" + folderName.Replace(" ", "") + "\"";
88 | }
89 |
90 | UserSettings.Default.excludedFolders = fieldExcludeFolders.Text;
91 | UserSettings.Default.Save();
92 | }
93 | }
94 |
95 | if (option_XF.IsChecked == true)
96 | {
97 | string filetypePattern = @"\*\.[A-Za-z0-9]*";
98 | Regex reg = new Regex(filetypePattern);
99 |
100 | if (String.IsNullOrEmpty(fieldExcludeFiletypes.Text))
101 | {
102 | MessageBox.Show("Excluded filetypes are missing!", "Filetypes missing", MessageBoxButton.OK, MessageBoxImage.Error);
103 | return;
104 | }
105 | else
106 | {
107 | string tempXFString = fieldExcludeFiletypes.Text.Replace(" ", "");
108 | string[] tempFiletypes = tempXFString.Split(',');
109 |
110 | foreach (var filetype in tempFiletypes)
111 | {
112 | if (reg.IsMatch(filetype))
113 | {
114 | optionXF += " \"" + filetype.Replace(" ", "") + "\"";
115 | }
116 | else
117 | {
118 | MessageBox.Show("Check filetypes requirements (e.g. *.jpg)!", "Filetypes", MessageBoxButton.OK, MessageBoxImage.Error);
119 | return;
120 | }
121 | }
122 |
123 | UserSettings.Default.excludedFiletypes = fieldExcludeFiletypes.Text;
124 | UserSettings.Default.Save();
125 | }
126 | }
127 |
128 | if (option_Logfile.IsChecked == true)
129 | {
130 | if (String.IsNullOrEmpty(fieldLogfile.Text))
131 | {
132 | MessageBox.Show("Please enter paths for log file.", "Path missing", MessageBoxButton.OK, MessageBoxImage.Error);
133 | return;
134 | }
135 | else
136 | {
137 | logPath = checkForBackslash(fieldLogfile.Text);
138 | // Pfad Probleme
139 | optionLog = " /LOG:\"" + logPath + "\\CopyFolderTool_" + DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".log\" /TEE /NDL";
140 | }
141 | }
142 |
143 | if(option_Shutdown.IsChecked == true)
144 | {
145 | optionClose = "/C ";
146 | }
147 | else
148 | {
149 | optionClose = "/K ";
150 | }
151 |
152 | if (button.Name == "btn_startCopying")
153 | {
154 | btn_startCopying.IsEnabled = false;
155 | command = optionClose + "ROBOCOPY \"" + @sourcePath + "\" \"" + @destinationPath + "\" " + optionE + optionXO + optionMOV + optionXD + optionXF + optionLog + standardOptions;
156 | System.Diagnostics.Process process = System.Diagnostics.Process.Start("CMD.exe", command);
157 | process.WaitForExit();
158 | Application.Current.Shutdown();
159 | btn_startComparing.IsEnabled = true;
160 |
161 | if (option_Shutdown.IsChecked == true)
162 | {
163 | _ = System.Diagnostics.Process.Start("Shutdown", "-s -t 10");
164 | }
165 | }
166 | else if (button.Name == "btn_startComparing")
167 | {
168 | btn_startComparing.IsEnabled = false;
169 | command = optionClose + "ROBOCOPY \"" + @sourcePath + "\" \"" + @destinationPath + "\" " + "/L /NJH /NJS /NP /NS";
170 | System.Diagnostics.Process process = System.Diagnostics.Process.Start("CMD.exe", command);
171 | process.WaitForExit();
172 | btn_startComparing.IsEnabled = true;
173 | }
174 |
175 | }
176 |
177 | private void selectFolder(object sender, RoutedEventArgs e)
178 | {
179 | var button = sender as System.Windows.Controls.Button;
180 | var dialog = new CommonOpenFileDialog();
181 | dialog.IsFolderPicker = true;
182 |
183 | if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
184 | {
185 | switch (button.Name)
186 | {
187 | case "btn_SourcePath":
188 | fieldSource.Text = dialog.FileName;
189 | break;
190 | case "btn_DestinationPath":
191 | fieldDestination.Text = dialog.FileName;
192 | break;
193 | case "btn_Logfile":
194 | fieldLogfile.Text = dialog.FileName;
195 | UserSettings.Default.logFilePath = fieldLogfile.Text;
196 | UserSettings.Default.Save();
197 | break;
198 | default:
199 | Console.WriteLine("Wrong Button");
200 | break;
201 | }
202 | }
203 | }
204 |
205 | private string checkForBackslash(string inputStr)
206 | {
207 | string lastChar = inputStr.Substring(inputStr.Length - 1);
208 | if (lastChar == "\\")
209 | {
210 | return inputStr.Remove(inputStr.Length - 1);
211 | }
212 | else
213 | {
214 | return inputStr;
215 | }
216 | }
217 |
218 | private void loadSettings()
219 | {
220 | fieldLogfile.Text = UserSettings.Default.logFilePath;
221 | fieldExcludeFolders.Text = UserSettings.Default.excludedFolders;
222 | fieldExcludeFiletypes.Text = UserSettings.Default.excludedFiletypes;
223 | return;
224 | }
225 |
226 | protected override void OnClosed(EventArgs e)
227 | {
228 | base.OnClosed(e);
229 | Application.Current.Shutdown();
230 | }
231 | }
232 | }
233 |
--------------------------------------------------------------------------------
/CopyFolderTool/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // Allgemeine Informationen über eine Assembly werden über die folgenden
8 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
9 | // die einer Assembly zugeordnet sind.
10 | [assembly: AssemblyTitle("CopyFolderTool")]
11 | [assembly: AssemblyDescription("A simple Robocopy GUI")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("Tobias Wilhelm")]
14 | [assembly: AssemblyProduct("CopyFolderTool")]
15 | [assembly: AssemblyCopyright("Copyright © 2022")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
20 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
21 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
22 | [assembly: ComVisible(false)]
23 |
24 | //Um mit dem Erstellen lokalisierbarer Anwendungen zu beginnen, legen Sie
25 | //ImCodeVerwendeteKultur in der .csproj-Datei
26 | //in einer fest. Wenn Sie in den Quelldateien beispielsweise Deutsch
27 | //(Deutschland) verwenden, legen Sie auf \"de-DE\" fest. Heben Sie dann die Auskommentierung
28 | //des nachstehenden NeutralResourceLanguage-Attributs auf. Aktualisieren Sie "en-US" in der nachstehenden Zeile,
29 | //sodass es mit der UICulture-Einstellung in der Projektdatei übereinstimmt.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //Speicherort der designspezifischen Ressourcenwörterbücher
36 | //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
37 | // oder in den Anwendungsressourcen-Wörterbüchern nicht gefunden werden kann.)
38 | ResourceDictionaryLocation.SourceAssembly //Speicherort des generischen Ressourcenwörterbuchs
39 | //(wird verwendet, wenn eine Ressource auf der Seite nicht gefunden wird,
40 | // designspezifischen Ressourcenwörterbuch nicht gefunden werden kann.)
41 | )]
42 |
43 |
44 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
45 | //
46 | // Hauptversion
47 | // Nebenversion
48 | // Buildnummer
49 | // Revision
50 | //
51 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
52 | // indem Sie "*" wie unten gezeigt eingeben:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.3.0.0")]
55 | [assembly: AssemblyFileVersion("1.3.0.0")]
56 | [assembly: NeutralResourcesLanguage("en")]
57 |
--------------------------------------------------------------------------------
/CopyFolderTool/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion: 4.0.30319.42000
5 | //
6 | // Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace CopyFolderTool.Properties
13 | {
14 | ///
15 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
16 | ///
17 | // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
18 | // über ein Tool wie ResGen oder Visual Studio automatisch generiert.
19 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
20 | // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources
25 | {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources()
33 | {
34 | }
35 |
36 | ///
37 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
38 | ///
39 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
40 | internal static global::System.Resources.ResourceManager ResourceManager
41 | {
42 | get
43 | {
44 | if ((resourceMan == null))
45 | {
46 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CopyFolderTool.Properties.Resources", typeof(Resources).Assembly);
47 | resourceMan = temp;
48 | }
49 | return resourceMan;
50 | }
51 | }
52 |
53 | ///
54 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
55 | /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
56 | ///
57 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
58 | internal static global::System.Globalization.CultureInfo Culture
59 | {
60 | get
61 | {
62 | return resourceCulture;
63 | }
64 | set
65 | {
66 | resourceCulture = value;
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/CopyFolderTool/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
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 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/CopyFolderTool/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 |
12 | namespace CopyFolderTool.Properties
13 | {
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
17 | {
18 |
19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
20 |
21 | public static Settings Default
22 | {
23 | get
24 | {
25 | return defaultInstance;
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CopyFolderTool/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CopyFolderTool/UserSettings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace CopyFolderTool {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
16 | internal sealed partial class UserSettings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static UserSettings defaultInstance = ((UserSettings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new UserSettings())));
19 |
20 | public static UserSettings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("C:\\logs\\")]
29 | public string logFilePath {
30 | get {
31 | return ((string)(this["logFilePath"]));
32 | }
33 | set {
34 | this["logFilePath"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("Backup")]
41 | public string excludedFolders {
42 | get {
43 | return ((string)(this["excludedFolders"]));
44 | }
45 | set {
46 | this["excludedFolders"] = value;
47 | }
48 | }
49 |
50 | [global::System.Configuration.UserScopedSettingAttribute()]
51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
52 | [global::System.Configuration.DefaultSettingValueAttribute("*.bak")]
53 | public string excludedFiletypes {
54 | get {
55 | return ((string)(this["excludedFiletypes"]));
56 | }
57 | set {
58 | this["excludedFiletypes"] = value;
59 | }
60 | }
61 |
62 | [global::System.Configuration.UserScopedSettingAttribute()]
63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64 | public int threads {
65 | get {
66 | return ((int)(this["threads"]));
67 | }
68 | set {
69 | this["threads"] = value;
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/CopyFolderTool/UserSettings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | C:\logs\
7 |
8 |
9 | Backup
10 |
11 |
12 | *.bak
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/CopyFolderTool/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 biteworks
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CopyFolderTool - A simple Robocopy GUI
2 |
3 | 
4 |
5 | ## About
6 |
7 | A simple folder context menu app to copy files to another folder. The tool is a GUI for Robocopy that simplifies the copying process.
8 |
9 | In this age of remote working, large amounts of data often need to be copied to network drives over VPN. This app helps to copy the data more robustly and reliably.
10 |
11 | ## Installation
12 |
13 | 1. Download latest release
14 | 2. Unzip the folder
15 | 3. Run "install.bat" as admin. All files will be copied to "C:/Tools/CopyFolderTools"
16 | 4. Right-click menu entry will be set automatically
17 |
18 | ## Uninstall
19 |
20 | 1. Run "uninstall.bat" as admin
21 | 2. Menu entry will be deleted and the tools folder also
22 |
23 | ## Usage
24 |
25 | 
26 |
27 | 1. Right-click on the folder you want to copy
28 | 2. Execute "CopyFolderTool" in the context menu
29 | 3. Now click on ". . ." to select the destination folder (or insert the path into the text field)
30 | 4. Select options by enable the checkboxes
31 | 5. Start copying by pressing the button
32 | 6. A commandline window will open and show the copy process
33 |
34 | ## Future plans
35 |
36 | 1. Save-mode to restart copy process
37 | 2. ~~Comparing Folders only~~
38 | 3. ~~Option to start exe without parameters~~ (Done)
39 |
--------------------------------------------------------------------------------
/_install/AddToRightclickMenu.reg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/biteworks/CopyFolderTool/9663fe54b188ce08827fb24ca8dfd42f48290003/_install/AddToRightclickMenu.reg
--------------------------------------------------------------------------------
/_install/RemoveToRightclickMenu.reg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/biteworks/CopyFolderTool/9663fe54b188ce08827fb24ca8dfd42f48290003/_install/RemoveToRightclickMenu.reg
--------------------------------------------------------------------------------
/_install/install.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | SET InstallDirectory="C:\Tools\CopyFolderTool\"
3 | SET CopyToFolder="%~dp0Executables\"
4 |
5 | ECHO 1. Check for "C:\Tools\CopyFolderTool\" folder
6 | IF NOT EXIST %InstallDirectory%NUL MKDIR %InstallDirectory%
7 | ECHO.
8 |
9 | ECHO 2. Copy files to directory
10 | COPY %CopyToFolder% %InstallDirectory%
11 | ECHO.
12 |
13 | ECHO 3. Registry entry will be set (needs admin rights)
14 | REM set __COMPAT_LAYER=RunAsInvoker
15 | REGEDIT.EXE /S "%~dp0\AddToRightclickMenu.reg"
16 | ECHO ...Done
17 | ECHO.
18 |
19 | PAUSE
--------------------------------------------------------------------------------
/_install/uninstall.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | SET InstallDirectory="C:\Tools\CopyFolderTool\"
3 |
4 | ECHO 1. Remove "C:\Tools\CopyFolderTool\" folder
5 | RMDIR /Q /S %InstallDirectory%
6 | ECHO ...Done
7 | ECHO.
8 |
9 | ECHO 2. Registry entry will be removed (needs admin rights)
10 | REM set __COMPAT_LAYER=RunAsInvoker
11 | REGEDIT.EXE /S "%~dp0\RemoveToRightclickMenu.reg"
12 | ECHO ...Done
13 | ECHO.
14 |
15 | PAUSE
--------------------------------------------------------------------------------
/_install/update.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | SET InstallDirectory="C:\Tools\CopyFolderTool\"
3 | SET CopyToFolder="%~dp0Executables\"
4 |
5 | ECHO 1. Check for "C:\Tools\CopyFolderTool\" folder
6 | IF NOT EXIST %InstallDirectory%NUL MKDIR %InstallDirectory%
7 | ECHO.
8 |
9 | ECHO 2. Update files in directory
10 | COPY %CopyToFolder% %InstallDirectory%
11 | ECHO ...Done
12 | ECHO.
13 |
14 | PAUSE
--------------------------------------------------------------------------------
/icons/Icon-CopyFolderTool.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/biteworks/CopyFolderTool/9663fe54b188ce08827fb24ca8dfd42f48290003/icons/Icon-CopyFolderTool.ico
--------------------------------------------------------------------------------
/screenshots/header-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/biteworks/CopyFolderTool/9663fe54b188ce08827fb24ca8dfd42f48290003/screenshots/header-image.jpg
--------------------------------------------------------------------------------
/screenshots/instruction-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/biteworks/CopyFolderTool/9663fe54b188ce08827fb24ca8dfd42f48290003/screenshots/instruction-image.jpg
--------------------------------------------------------------------------------