This repo contains three PowerShell scripts that detect gaps between files based on the date prefix in their filenames (yyyy-MM-dd).
Each script flags gaps of a different threshold: 7, 14, or 21 days.
All files must begin with a date in yyyy-MM-dd format, like:
2023-08-04_receipt.pdf
2023-08-18_invoice.jpg
2023-09-10_form.docx
| Script | Gap Threshold | Use Case |
|---|---|---|
detect-7-day-gaps.ps1 |
≥ 7 days | Weekly tracking |
detect-14-day-gaps.ps1 |
≥ 14 days | Biweekly audits |
detect-21-day-gaps.ps1 |
≥ 21 days | Strict compliance checks |
- **Shift + Right-click the folder that contains the files you want to check
- **Click “Open PowerShell window here”
- **Copy the script from the .ps1 file (open it in Notepad or click it here on GitHub)
- **Paste it into PowerShell
- **Press Enter
✅ That’s it — the script will scan your filenames and show any gaps of 7, 14, or 21 days depending on which version you use.
Let’s say your folder contains these files:
- 2023-07-01_receipt.pdf
- 2023-07-08_receipt.pdf
- 2023-07-22_receipt.pdf
- 2023-08-15_receipt.pdf
If you run the 14-day gap script, it will show:
- 2023-07-08 → 2023-07-22 = 14 days
- 2023-07-22 → 2023-08-15 = 24 days
✅ What this means:
The first gap (14 days) is right on the threshold — maybe fine, maybe worth checking. The second gap (24 days) is longer — likely a missing document or forgotten upload.
This kind of output helps you spot missing documents, skipped uploads, or irregular activity... especially useful for audits, reimbursements, or compliance tracking.
- 🧳 Travel reporting — flag extended trips abroad for tax or residency disclosures
- 🗂️ Business audits — detect missing reports, invoices, or operational logs
- 🔐 Security reviews — identify periods with no activity or missing surveillance files
- 📅 Compliance tracking — ensure regular submissions for healthcare, finance, or legal docs
- 🧠 Personal organization — spot gaps in journals, receipts, or scanned paperwork