Skip to content

Scans date-prefixed filenames to flag long gaps — useful for audits, compliance tracking, travel reporting, business documentation, and security reviews. Originally built to analyze 300+ files spanning a 10-year period.

Notifications You must be signed in to change notification settings

Murky418/date-gap-detector-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📁 Date Gap Detector Scripts

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.

📦 File Naming Convention

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

🛠️ Scripts

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

▶️ How to Use (Fastest Method)

  1. **Shift + Right-click the folder that contains the files you want to check
  2. **Click “Open PowerShell window here”
  3. **Copy the script from the .ps1 file (open it in Notepad or click it here on GitHub)
  4. **Paste it into PowerShell
  5. **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.

📊 Example Output

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.

Common use cases:

  • 🧳 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

About

Scans date-prefixed filenames to flag long gaps — useful for audits, compliance tracking, travel reporting, business documentation, and security reviews. Originally built to analyze 300+ files spanning a 10-year period.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published