Skip to content

File Tools

By the end of this chapter File Explorer will preview files it used to show as blank icons, your photos will resize in batches from a right-click, forty files will rename in one previewed pass, the file that "is in use" will tell you by whom, and your own templates will sit on the New menu.

All five tools live where files live — in Explorer's menus — rather than on shortcuts.

File Explorer add-ons: previews and thumbnails

Out of the box, Explorer's Preview Pane (Alt+P) shows a few kinds of file and gives up on the rest. Enable these add-ons and it learns:

  • Previews for SVG and Markdown, PDF, G-code and BGCODE (3D-printing files), QOI images, and source code in more than 150 extensions, rendered by the Monaco editor — the same code viewer as Visual Studio Code.
  • Thumbnails — real pictures instead of generic icons — for SVG, PDF, G-code, BGCODE, STL (3D models) and QOI files.

Two cautions from Microsoft's own page, both worth heeding. Enabling a preview handler overrides the handler that was there: users have reported the PDF preview disappearing inside Outlook when the PowerToys PDF handler takes over Explorer's — if a preview you rely on vanishes after enabling these, this is the first suspect. And Markdown previews keep local images off by default, so a preview cannot quietly fetch pictures from the document's neighbourhood; turn it on only for folders you trust.

Image Resizer: bulk resizing from the right-click menu

Select one photo or fifty in Explorer, right-click, choose Resize with Image Resizer, pick a size, done. Resized copies are written beside the originals (originals are kept, unless you tick the option to replace them). You can also drag files with the right mouse button and drop them to get the same menu.

Sizes are presets you define on the Settings page — a name, a width and height, and a unit: pixels, percent, inches or centimetres. Each preset says how the picture meets the box:

  • Fit — the whole picture inside the box, proportions kept, nothing cut.
  • Fill — the box filled, proportions kept, the overflow cropped away.
  • Stretch — the box filled exactly, proportions not kept. Rarely what a photo wants.

Filenames follow a pattern you set, built from parameters: %1 is the original name, %2 the size name, %3/%4 the chosen width and height, %5/%6 the resulting ones. The pattern %1 (%2) turns example.png resized as Small into example (Small).png, and a pattern like %2\%1 sorts each size into its own subfolder. There is a fallback encoder for formats Windows can read but not write, and an option to keep the original modified date.

There is also a command line — PowerToys.ImageResizer.CLI.exe — which takes the same presets by index (--size 0) or explicit --width/--height, with switches such as --shrink-only, --remove-metadata and --quality for JPEGs. It is the version of this tool a script wants; the full flag table is on the utility's page.

PowerRename: bulk renaming with a preview

Right-click a selection and choose Rename with PowerRename. Type a search and a replacement, and the window shows — before anything happens — the old name and the new name side by side, item by item. Only when the preview is right do you apply it. If you still get it wrong, Ctrl+Z in Explorer undoes the rename.

That preview is what makes the powerful parts safe to touch:

  • Regular expressions (ECMAScript syntax, with an optional Boost engine that adds lookbehind) for names with patterns instead of fixed text.
  • Case options and scope: rename the name only, the extension only, files only, folders, subfolders.
  • Enumeration: ${padding=4;increment=2;start=10} in the replacement numbers the files 0010, 0012, 0014… with the padding and step you set.
  • Random strings: ${ruuidv4} inserts a unique identifier.
  • Dates and camera data: patterns like $YYYY-$MM-$DD from the file's dates, and EXIF patterns such as $DATE_TAKEN_… and $CAMERA_MODEL read from photos themselves — the difference between IMG_4021.jpg and 2026-08-14 Fuji X100 harbour.jpg is one previewed rename.

Plain search-and-replace covers most real jobs ("IMG_" to "holiday-", spaces to hyphens). The expressions are there for the day the names stop being uniform.

File Locksmith: who is holding this file?

"The file is in use" stops being a dead end. Select the file (or a folder, to scan everything inside it), right-click, Show more options, then Unlock with File Locksmith. It lists the processes using the file; expand one for details, or End task to close the process and free the file.

Processes belonging to other users are invisible to a normal scan. The window's Restart as administrator button rescans with full reach. Its command line — PowerToys.FileLocksmith.CLI.exe — is script-shaped: paths in, optionally --json out, --wait (with --timeout) to pause a script until a file is released, and --kill to end whatever holds it. Use --kill the way you would use End task: it is a real termination, not a polite request.

New+: the New menu, stocked by you

Explorer's right-click New menu offers whatever Windows and your apps registered — rarely the blank project folder, the meeting notes template, or the letterhead you actually start from. New+ replaces that list with your own: right-click in a folder, New+, pick the template.

Templates are just files and folders in a folder of their own — by default %localappdata%\Microsoft\PowerToys\NewPlus\Templates, reachable from the menu's Open templates. Anything you put there becomes a menu item: a text file, a Word template, a whole folder tree for new projects, even shortcuts. Settings can point the folder somewhere synced (OneDrive, say) so every machine offers the same templates, hide the filename extensions and the numbering prefixes people use to order the menu, replace the built-in New menu entirely, and expand variables in template filenames — $YYYY-$MM-$DD, the same date patterns as PowerRename, plus things like %USERNAME% — so a new notes file can arrive already named with today's date.

Start small: one "notes" text file and one project folder. Templates earn their keep by being the ones you use weekly, not by being complete.