How pkr-lab/docflowengine works
DocFlowEngine is a PowerShell document-watching and filing tool. Its documented workflow starts with a user running the script, reads configured paths and rules, detects new documents in source folders, renames them, and copies them into a target structure; DryRun allows actions to be previewed. The tree exposes separate engine modules for these responsibilities, plus state, locking, naming, and copy-back/forward behavior. No source excerpts were provided, so internal module calls and the precise roles of several helpers are not asserted; documented workflow edges cite the README.
Main entry points: DocFlowEngine.ps1 Engine runner · CopyForward.ps1 Folder monitoring · State.ps1 New-document detection · Rename.ps1 Rule-based renaming
Components 19
Document workflow
- Engine runner
scripts/DocFlowEngine.ps1 - Folder monitoring
scripts/DocFlowEngine/CopyForward.ps1 - New-document detection
scripts/DocFlowEngine/State.ps1 - Rule-based renaming
scripts/DocFlowEngine/Rename.ps1 - Target copying
scripts/DocFlowEngine/CopyForward.ps1 - Dry-run mode
scripts/DocFlowEngine.ps1
Engine internals
- Shared utilities
scripts/DocFlowEngine/Common.ps1 - Naming rules
scripts/DocFlowEngine/Naming.ps1 - Processing state
scripts/DocFlowEngine/State.ps1 - Execution locking
scripts/DocFlowEngine/Lock.ps1 - Copy-back handling
scripts/DocFlowEngine/CopyBack.ps1 - Copy-forward handling
scripts/DocFlowEngine/CopyForward.ps1 - Engine module
scripts/DocFlowEngine.psm1 - Module manifest
scripts/DocFlowEngine.psd1
Configuration
- Path and rule config
config/docflow-config.psd1 - Configuration handling
scripts/DocFlowEngine/Config.ps1
Other components
- Operator
- Source folders
- Target structure
Connections 8
- Operator → Engine runner: runs
README.md - Engine runner → Path and rule config: uses paths and rules
README.md - Source folders → Folder monitoring: is monitored
README.md - Folder monitoring → New-document detection: finds new documents
README.md - Engine runner → Rule-based renaming: renames by rules
README.md - Engine runner → Target copying: copies documents
README.md - Target copying → Target structure: writes into
README.md - Engine runner → Dry-run mode: supports preview
README.md