Portfolio / Batch file processor
Batch file processor
A folder of twelve weekly reports, one button. Watch it combine the good files, fix what it safely can, and tell you exactly which files need a human.
Twelve files, one button. Let’s see who behaves.
Meet Kevin, the operations lead for a company with four branches.
Every week each branch drops its reports into a shared folder. Kevin opens every file, copies the rows into one master spreadsheet, and hopes nobody renamed a column. Some weeks a file is empty or saved twice, and he only finds out when the totals look wrong.
Example scenario: the people and businesses on this page are made up.
Before
- Twelve weekly files from four branches in one shared folder
- Opened one by one and copied into a master sheet
- An empty file, a renamed column, a file saved twice
- Problems only found when the totals look wrong
After
- The whole folder combined in one run
- Each problem file flagged, with a reason
- Safe fixes, like date formats, done automatically
- A clean file ready for Power Query or Power BI
Try it yourself
| File | Size | Rows | Result |
|---|
Hours by branch
Files that need attention
A simulation in your browser. The real tool is a Python script that runs on your own folder of files.
What this could be worth to you
No more opening a dozen files a week, and bad files never sneak into the totals.
Example numbers to start you off. Move the sliders to match your business. These are estimates, not a guarantee or financial advice; your results depend on your situation.
The problem
Combining a folder of reports by hand is slow and fragile: one empty file, one renamed column or one duplicate quietly throws off the totals.
The solution
A Python script that opens every file in the folder, checks it before using it, fixes safe problems like day-first dates, skips anything that would make the totals wrong, and explains every decision in a log.
How it's built
- ScanList every file in the folder.
- CheckEmpty? Missing columns? An exact copy?
- FixSafely convert things like date formats.
- CombineStack the good files into one table.
- ReportA summary plus a list of files needing attention.
A simplified version of the script:
from pathlib import Path
import pandas as pd
frames, problems = [], []
for f in Path("Branch Reports/October").glob("*.xlsx"):
df = pd.read_excel(f)
if df.empty:
problems.append((f.name, "empty file")); continue
if "Hours" not in df.columns:
problems.append((f.name, "missing Hours column")); continue
df["Source file"] = f.name
frames.append(df)
combined = pd.concat(frames).drop_duplicates()
combined.to_excel("October_Combined.xlsx", index=False)
What it makes possible
- Weekly consolidation in seconds instead of an hour
- Totals you can trust, because bad files never sneak in
- A clear log of what happened to every file
Skills shown
More to try
Stop copying and pasting between files
Tell me how your folder of reports looks, and I'll automate it.
Starting prices are for smaller projects. Bigger or more complex jobs are priced by scope: how much there is and how long it takes.