Windows maintenanceDevelopment & Customization

A PowerShell script that clears old temporary files, checks disk space and services, and writes down what it did

Usually ready in 15 minutesRevisions includedQuality check
Packages
Payment protectionDetails
  • Revisions within the package are free.
  • If you do not respond within 3 days of delivery, the work is accepted automatically.

The money is reserved when you pay and released only once you accept the work.

A PowerShell script that clears old temporary files, checks disk space and services, and writes down what it did

Example result

Example for the Standard package

Merging the monthly sales files of 9 shops into one Excel report

How it is run

python merge_sales.py --month 2026-10
2026-11-02 09:14:03 INFO  Folder: sales/2026-10, 9 files found
2026-11-02 09:14:03 INFO  shop-01.csv: 1,284 rows
2026-11-02 09:14:04 INFO  shop-02.xlsx: 967 rows
2026-11-02 09:14:04 WARN  shop-07.csv: 3 rows without a price skipped (lines 88, 412, 913)
2026-11-02 09:14:05 INFO  Done: 10,412 rows -> report-2026-10.xlsx (sheets "Sales" and "Totals")

Settings, not code

The column names of each shop live in settings.ini, so a new shop or a renamed column is a line there:

[columns]
date = Date, Sale date, Day
product = Product, Item, Name
quantity = Qty, Quantity, Pcs
price = Price, Unit price

A part of the code

def read_shop_file(path: Path, columns: dict[str, list[str]]) -> pd.DataFrame:
    """Reads one shop's file and gives it the report's column names."""
    table = pd.read_excel(path) if path.suffix == ".xlsx" else pd.read_csv(path, encoding="utf-8-sig")
    renamed = {}
    for name, variants in columns.items():
        found = next((c for c in table.columns if c.strip() in variants), None)
        if found is None:
            raise ReportError(f"{path.name}: no column for '{name}' (looked for {', '.join(variants)})")
        renamed[found] = name
    table = table.rename(columns=renamed)[list(columns)]
    table["shop"] = path.stem
    return table

Files: a ZIP archive with merge_sales.py (310 lines), settings.ini, requirements.txt and a README with installing Python, running the script and what each message in the log means. The client runs it on their own computer.

Client: a small chain of 9 stationery shops; each shop sends its sales for the month as a CSV or Excel file, with slightly different column names. Task: one script that reads every file in a folder, brings the columns to one shape, and writes a single Excel report with all sales and a sheet of totals by shop.

The client and all details are made up.

About this service

Office or home computers slowly fill up with temporary files, old logs and forgotten downloads until a disk runs out of space. This PowerShell script, which runs on Windows 10 and 11 with nothing to install, does the routine for you: it clears the temp folders and any folders you name of files older than the days you set, shows how much space it freed, warns when a disk has less free space than your limit and, from Standard, checks that named services such as a backup or print service are running and restarts them if you allow it. Nothing is deleted outside the folders and ages you give, and a check run lists files without touching them. Try it first on a test computer. No registry tweaks, speed-up tricks or turning off security.

What is included

  • What you getA ZIP archive with the PowerShell script, a README with step-by-step instructions and, from Standard, a settings file with folders, ages and services; the code is also shown on the order page.
  • Built into WindowsPowerShell comes with Windows 10 and 11
  • Only by your rulesThe folders and file ages you set, nothing else
  • Check runFrom Standard, a list of what would be removed, with nothing removed
  • Disk space warningWhen free space drops below your limit
  • Readable codeWith comments, easy to add a folder later

How it works

  1. 1
    RulesYou list the folders, ages and services to look after
  2. 2
    CodeWe write the script and the guide to running it
  3. 3
    Try itYou run it on a test computer, first as a check run
  4. 4
    ChangesYou ask for changes within your package and send any error message

What we need from you

The Windows version (10 or 11, Home or Pro) and whether the script may run as administrator, the folders to clean and how old files must be to go (for example temp folders after 7 days, a scans folder after 90), anything that must never be touched, the free space limit for warnings and, from Standard, the services to check by their names. How many computers it is for and whether they are in a domain.

We will ask you:

  • Which computers is it for?
  • What should it clean, and after how long?
  • What should it check?
  • Anything it must never do

Compare packages

PackagesBasicOne clean-up$16StandardMaintenance with settings$33PremiumMaintenance tool$67
Deadline1 day2 days3 days
Revisions123
Codeup to 150 linesup to 400 linesup to 1,000 lines
Files of code1up to 3up to 8
Settings fileNoYesYes
Clear error messages and a logNoYesYes
Run options and a guide to running it on a scheduleNoNoYes
Guide to installing and running it (README)YesYesYes
LanguagePowerShellPowerShellPowerShell
Order BasicOrder StandardOrder Premium

Payment protection

You pay when you order, but the money is released only for accepted work.

  • Fixed priceThe package price does not change after you pay.
  • The money is reservedWhen you pay, the amount is only reserved. It is released to the service once you accept the work.
  • Checked before deliveryEvery result goes through a quality check before it reaches you, and you see it on the order page before accepting it.
  • Free revisionsAsk for changes within your brief as many times as the package allows.
  • Acceptance after 3 daysIf within 3 days of delivery you neither accept the work nor ask for changes, it is accepted automatically. If you write in the order chat after delivery, the order waits; once we answer, we may start the 3 days again and will say so in the chat.
  • Redo or a full refundIf the result does not match your brief and the revisions did not fix it, or the work takes more than twice its deadline, write in the order chat: we will redo the work or refund the payment in full.
How it works →

Questions and answers

Will it make my computer faster?

We do not promise that. The script frees disk space and keeps routine tasks in order; a full disk does slow Windows down, but it does not tune Windows or change its settings.

Can it delete something important?

It removes only files in the folders you list and only older than the days you set. Run the check run first, look at the list, and try it on a test computer before others.

Windows says running scripts is disabled. What now?

That is a normal Windows setting. The README shows how to run this one script without lowering the setting for the whole computer.

Will you connect to my computers?

No. We never connect to your computers. You copy the script and run it yourself, and Premium's guide shows how to run it on a schedule.

Did not find your answer?

Packages