How biteworks/copyfoldertool works
From the project’s file tree and README, it is clear that CopyFolderTool is a simple Windows GUI application (built with .NET/WPF) that serves as a front end for the robust copying utility Robocopy. Its purpose is to simplify the process of copying folders—especially over network drives via VPN—by providing a graphical interface that integrates with the Windows context menu.
Main Components
• GUI Application: This component is built using WPF (as indicated by the App.xaml, MainWindow.xaml, and their corresponding code-behind files). It handles user interactions (selecting folders, displaying options, and launching the copying process).
• Integration with Robocopy: Although Robocopy itself isn’t part of the source, the application acts as a wrapper. Indicate a component (“Robocopy Utility”) that the GUI triggers through command-line calls.
• Installer and Context Menu Integration: The _install folder contains batch scripts and registry entries (.reg files) used to add or remove the right-click context menu. This can be shown as an “Installation/Context Menu Integration” component that interacts with the Windows shell.
• Configuration and Settings: The presence of settings files (user settings and application configuration) and assembly info implies a configuration management aspect that interacts with the main code to determine runtime behavior.
Relationships and Data Flow
• The Windows Explorer right-click triggers the context menu entry that starts the application.
• When a user activates the “CopyFolderTool” via the context menu, the GUI is launched.
• The GUI collects user inputs such as source/destination paths and options, then issues a command-line process call to execute Robocopy.
• Installer scripts communicate with the Windows registry to add or remove the context menu option.
• The configuration/settings files are loaded at application startup to define parameters (e.g., defaults, paths, and options).
Architectural Patterns and Design Principles
• Separation of Concerns: The design differentiates the user interface layer from the underlying process execution (i.e., invoking Robocopy).
• Modularity: The installer scripts, application GUI, and the external Robocopy utility form distinct modules that interact via clearly defined interfaces.
• Windows Integration: The architecture leverages Windows registry modifications to integrate seamlessly with the OS context menu.
Relevant Technologies, Frameworks, and Libraries
• .NET (likely .NET Framework given WPF usage) for the GUI.
• Windows Presentation Foundation (WPF) for the user interface (files like App.xaml, MainWindow.xaml).
• Batch scripting and registry files for installation logic.
• Robocopy as an external utility that handles the actual file copying process.