Simple WPF utility to preview and move documents into a destination folder structure using a JSON configuration and a customer spreadsheet.
- Loads a JSON configuration that defines document sets, matching and destination rules.
- Loads customers from an Excel/CSV file.
- Scans a source folder for files and, based on selected customer and doc code, previews or moves each file to a destination path determined by the configuration and naming rules.
- Optionally writes an Excel log of moved files.
- Preview mode (no filesystem changes) and Run mode (performs moves).
- Config-driven document rules and destination naming formats.
- Customer-driven choices (category → allowed doc codes).
- Persistent UI paths via
UserSettings. - Simple grid view of results (
MoveResult) with success/failure messages. - Sample input files in
SlothTest(config + customers).
- Open the solution in Visual Studio 2022.
- Set
SlothAppas the startup project. - Build Solution and Start Debugging (F5) or run the built exe.
- Use the UI:
- Browse and
Load Config(JSON) - Browse and
Load Customers(XLSX / CSV) - Select a customer and a Doc Code
- Set
Sourcefolder andDest Root - Click
Previewto see planned moves, orRunto execute and optionally write the log
- Browse and
SlothTest\SlothConfig.json— sample configuration (document sets, matching, destination settings).SlothTest\Customers.csv— sample customers used by the UI.
SlothApp\MainWindow.xaml.cs— UI glue: dialogs, validation, launching the batch flow.Sloth.Core\Models\SlothConfig— configuration model (document sets, matching, dest settings).Sloth.Core\Models\Customer— customer data used to map to document sets.Sloth.Core\Models\SourceDoc— lightweight input for each source file.Sloth.Core\Models\MoveResult— row returned for each file (dest path, success, message).Sloth.Core\Services\ConfigService— load/parse JSON config.Sloth.Core\Services\ExcelService(+ extensions) — read customers; write move log.Sloth.Core\Services\BatchMoveService— core preview/execute logic.Sloth.Core.Services\MatchingService,NamingService,RoutingService— rules for matching, naming, and destination path creation.Sloth.Core\Services\UserSettings— persists last-used UI paths.
- Load config and customers.
- Select customer → UI limits doc codes to those in the config for the customer's category.
- Choose a doc code.
- Ensure
Sourcefolder contains files to route. - Preview to verify mapping. If OK, Run to move files.
- If configured, a move log (Excel) will be written on Run.
- The app requires real source and destination directories; it will raise user-facing errors if missing.
- Document sets are keyed by
Customer.Category— customers without a category mapping will show no doc codes. - Log writing is attempted only after a successful
Run. - UI saves paths automatically when the window closes.
- To change matching, naming or routing behavior, inspect and modify:
BatchMoveService,MatchingService,NamingService,RoutingService.
- Add unit tests around
MatchingServiceandNamingServiceto validate rule changes.
- Put breakpoints in
RunCore(inMainWindow.xaml.cs) and step intoBatchMoveService.PreviewAndExecutewhile running a small sample set. - Use the
SlothTestsample files to simulate real inputs.
Created as a concise summary to help new contributors and reviewers quickly understand project responsibilities and where to look next.