A small feature request: "I have 80 invoice PDFs called invoice (12).pdf . Can your tool rename them to 2026-10-15_Acme_550.00.pdf based on what's inside?" Reading the PDF and extracting the date, vendor and amount is the fun part. Actually renaming the files on the user's disk turned out to be the tricky part. Here are the three approaches I tried.
Option 1: File System Access API
Chromium browsers let you ask for a directory handle and write to it:
const dir = await window . showDirectoryPicker ({ mode : ' readwrite ' }); for await ( const [ name , handle ] of dir . entries ()) { if ( handle . kind !== ' file ' || ! name . endsWith ( ' .pdf ' )) continue ; const file = await handle . getFile (); const newName = await buildName ( file ); if ( handle . move ) await handle . move ( newName ); // in-place rename }
Enter fullscreen mode
Exit fullscreen mode
When it works, it's magical: files are renamed in place, no downloads. The catches:
Availability. showDirectoryPicker is Chromium-only.…