From 490c3088302a35feab6b19b23a83c4eeedd92c58 Mon Sep 17 00:00:00 2001 From: Brad Lance Date: Wed, 26 Aug 2026 20:42:31 -0500 Subject: [PATCH] Say so when a configured file type matches nothing in a full folder Melissa's date folders hold .tiff and .txt. A leftover insurance_file_type of "tif" matches neither - -Filter is exact - so the run reported "nothing to send" on a folder with six files in it, which is indistinguishable from an empty folder and is the same blind spot that hid the .pdf/.tif mismatch for weeks. It now names what is actually in the folder and which setting to remove: Nothing matched .tif, but 20260826\ holds 6 file(s): 3x .tiff, 3x .txt -> insurance_file_type is set to 'tif' in entity.json. Remove that line to send everything, or correct it. --- VERSION.txt | 2 +- engine.ps1 | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 5858312..7131d59 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -63ea071 2026-08-26 setup wizard +e0f1a2b 2026-08-26 setup wizard + any-file-type upload diff --git a/engine.ps1 b/engine.ps1 index 6e0e3fc..a802719 100644 --- a/engine.ps1 +++ b/engine.ps1 @@ -419,8 +419,19 @@ foreach ($practice in $practices) { Write-Host " $today\ NOT archived - $ignored file(s) were ignored (unconfigured path)." -ForegroundColor Yellow Write-Info "NOARCHIVE entity=$entityName practice=$pracName reason=$ignored ignored files" } elseif ($insFiles.Count + $ptStmts.Count -eq 0) { - Write-Host " Nothing to send in $today\ ($fileTypeLabel)." -ForegroundColor Gray - Write-Info "SKIP entity=$entityName practice=$pracName reason=no matching files in date folder" + # A configured file type that matches nothing looks identical to + # an empty folder, which is what "no pdf" hid for weeks. Say so. + $present = @(Get-ChildItem -Path $dateDir -File) + if ($insuranceExt -and $present.Count -gt 0) { + $what = ($present | Group-Object Extension | + ForEach-Object { "$($_.Count)x $($_.Name)" }) -join ", " + Write-Host " Nothing matched .$insuranceExt, but $today\ holds $($present.Count) file(s): $what" -ForegroundColor Yellow + Write-Host " -> insurance_file_type is set to '$insuranceExt' in entity.json. Remove that line to send everything, or correct it." -ForegroundColor Yellow + Write-Info "MISMATCH entity=$entityName practice=$pracName filter=$insuranceExt present=$what" + } else { + Write-Host " Nothing to send in $today\ ($fileTypeLabel)." -ForegroundColor Gray + Write-Info "SKIP entity=$entityName practice=$pracName reason=no matching files in date folder" + } } $totalOk += $insResult.Ok; $totalFail += $insResult.Fail