Free

Free coded apps to suit all. No sign up, no email, usable offline, updates when I can, feedback welcome. Send feedback

How-to

How to batch rename files in a folder

Batch Rename in Paint by Zaweba renames a folder of files with patterns such as {name}, {n:000} and the date, with a preview and clash checks first.

How to batch rename files in a folder

Batch Rename, under File > Automate in Paint by Zaweba, does exactly this. You give it a folder and a pattern built from tokens such as {name} for the old name, {n:000} for a running number padded to three digits, {date} for the photo's date, {ext} and {folder}, and it renames every file at once. A preview shows the new names before anything changes, clashes are checked, and a log records what was done.

Camera files arrive with names like IMG_4821, which tell you nothing. Renaming them by hand is fine for five files and miserable for five hundred, and a mistake halfway through can leave a folder in a muddle.

What you need

A folder of files and Paint by Zaweba on Windows. It works offline and needs no account. Although it's an image editor, Batch Rename simply renames, so it's useful for any batch of pictures you're organising.

Building a pattern

A pattern is ordinary text with tokens in curly brackets. Each token is filled in for each file.

{name} keeps the original name, useful when you want to add something to it rather than replace it. {n:000} counts up, 001, 002, 003, and the number of zeros sets the padding, which keeps files sorted correctly. {date} uses the EXIF date the camera wrote into the photo, so pictures sort in the order they were taken even if they were copied in a different order. {ext} keeps the extension, and {folder} adds the folder's name, handy when a folder is called after the event.

So a pattern like {folder} {n:000} turns a folder called Wedding into Wedding 001, Wedding 002 and so on.

Step by step

Choose File > Automate > Batch Rename and pick the folder. Type a pattern and watch the preview fill with old and new names side by side. Adjust until the names look right.

You can also find and replace text in names, with regular expressions for more complex changes, change the case of names, and change extensions. That covers jobs like removing a camera prefix, swapping spaces for hyphens or tidying a mix of upper and lower case.

When the preview looks right, run it. If two files would end up with the same name, the clash check catches it before anything is overwritten. Afterwards, the log keeps a record of the old and new names.

Getting a good result

Use a running number or a date in the pattern so every name is unique. Pad numbers to the size of the batch, three digits for under a thousand files, so they sort in order in Windows and on other systems.

Rename a copy of the folder the first time you try a new pattern. The preview shows what will happen, but working on a copy means a surprise costs nothing.

Keep names short and plain. Letters, numbers and hyphens travel well between computers, websites and phones. Some characters cause trouble elsewhere, so it is safest to avoid slashes, colons and question marks.

Working with other batch tools

Batch Rename fits alongside Paint by Zaweba's other automation. Batch runs a recorded action over a folder of images, such as resizing or exporting, and File > Image Processor converts a folder to JPEG, PNG, WebP or TIFF with a size limit. A typical routine is to convert and resize first, then rename the results into a tidy numbered set ready to share or upload.