Invoices · automation

How to batch rename PDF files based on their content

Updated 24 November 2026 · Lasting Apps, Dublin, Ireland

You want invoice (3).pdf to become 2026-09-30 Acme Telecom €54.20.pdf, for a few hundred files at once. The date, supplier and amount are right there on the page. Getting a computer to read them and use them in the file name is harder than it looks. Here are the routes that work, and what each one asks of you.

Why normal bulk renamers can’t do it

Bulk renamers work from what Windows already knows about a file: its name, dates and properties. Bulk Rename Utility, a popular Windows renamer, can use photo EXIF data, music tags and Windows file properties.1 Its manual mentions PDF metadata, meaning the document properties, not the text printed on the page.3 It’s free for personal use at home, but businesses need a commercial licence for each computer it’s installed on.2

Microsoft’s free PowerRename has the same limit: it can add a date, but not the supplier or amount. See how to rename scanned receipts automatically for that route.

Two separate problems

  1. Getting the text out. Invoices you download usually have real text in them. Scans and phone photos are just pictures until something runs OCR (optical character recognition) on them.
  2. Finding the right bits. Every supplier puts the date, total and VAT in a different place, and writes dates differently. This is where most do-it-yourself setups break down.

Route 1: OCRmyPDF and pdftotext (free, technical)

OCRmyPDF adds a searchable text layer to scanned PDFs using the open-source Tesseract engine. It’s MPL-2.0 licensed and supports Windows, macOS and Linux.45 For one scan:

ocrmypdf scan_0034.pdf scan_0034-ocr.pdf

pdftotext, part of the Poppler tools, converts a PDF to plain text.6 This prints the text so you can see what a script would have to work with:

pdftotext -layout scan_0034-ocr.pdf -

From there, you need a script that finds the date, supplier and total in that text and renames the file. Writing one that copes with your own suppliers is doable. Writing one that copes with a new supplier next month is the hard part.

Good for: people comfortable with scripts and a fixed set of suppliers.

Route 2: Power Automate Desktop (Windows)

Microsoft’s Power Automate Desktop has an Extract text from PDF action that puts the page text into a variable.7 Its OCR engines are installed with it and work locally, without connecting to the cloud, but its OCR action reads screens and image files, not PDFs directly.8 Microsoft also notes that its table action can’t read non-copyable text from scanned PDFs.7

You build a flow: extract the text, pick out the date and amount, then rename the file. It’s visual rather than code, but you still have to tell it where each supplier puts each detail.

Good for: Microsoft 365 workplaces that already use Power Automate.

Route 3: Paperless-ngx (self-hosted)

Paperless-ngx is a free, open-source document system. It runs OCR on scans, uses machine learning to suggest correspondents and tags, and keeps your data on your own server.9 It can name stored files from document details, for example {{ created_year }}/{{ correspondent }}/{{ title }}.10

The catch is the setup. The project says the easiest way to install it is with Docker Compose, and that it should never be run on an untrusted host, because information is stored without encryption.11 An amount in the file name would need a custom field.10

Good for: people happy to run and maintain a small server.

Route 4: a cloud parser (Zapier and Docparser)

Automation services can do the reading for you. Zapier’s Docparser integration, for example, uploads each document to Docparser, which starts parsing it as soon as it arrives.12 It’s the least technical route, but every invoice now goes to two outside companies. For business records, check that with whoever handles data protection.

Side by side

RouteFiles leave your PCReads scansSetup
OCRmyPDF and pdftotextNoYes, with OCRmyPDFCommand line and a script
Power Automate DesktopNo, for the steps aboveNot from PDFs directlyA flow per layout
Paperless-ngxTo your own serverYesDocker and a server
Zapier and DocparserYesDepends on the parserAccount and templates

Whichever route you pick

Bulk Rename Utility, OCRmyPDF, Poppler, Power Automate, Paperless-ngx, Zapier and Docparser belong to their owners. We are not affiliated with any of them.

Sources

  1. Bulk Rename Utility: home page
  2. Bulk Rename Utility: licensing
  3. Bulk Rename Utility: user manual (PDF)
  4. OCRmyPDF documentation
  5. OCRmyPDF on PyPI
  6. pdftotext manual page (Poppler)
  7. Microsoft Learn: Power Automate desktop PDF actions
  8. Microsoft Learn: Power Automate desktop OCR actions
  9. Paperless-ngx documentation
  10. Paperless-ngx: file name handling
  11. Paperless-ngx on GitHub (README)
  12. Zapier: Docparser integrations

Comments

Ask a question or add something

A person reads every comment before it appears. Please don’t include links, or personal details like email addresses, phone numbers, PPS or account numbers, about you or anyone else. Keep it civil. You must be 16 or over.

Filewell is in development

Filewell names and files your invoices and receipts. Right on your PC.

Free100 documents a month
€0
ProEvery Pro feature, no limit
€39one-time · then €49
Family passPro in every Lasting Apps app
€79one-time
AI PackOptional AI help, prepaid
€9

Join the waitlist

Beta invite and the €39 founding price.

What should it do first? Pick up to 3. The most wanted gets built first.