Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Batch File Renamer

A small browser-based tool for renaming a group of files at once.

I originally made this to help with some WordPress development work. I kept running into folders full of images and other assets that needed a quick naming cleanup before I uploaded them into WordPress, and I wanted something simpler than opening PowerShell or installing a separate renaming app.

The tool runs entirely in the browser. It does not upload your files anywhere.

Try it online

You can use the Batch File Renamer directly in your browser through GitHub Pages.

Open Batch File Renamer

What it does

You can rename all of the files in a folder in three basic ways.

Add a prefix

Adds text to the beginning of the existing filename.

photo.jpg

with:

project_

becomes:

project_photo.jpg

Add a suffix

Adds text to the end of the existing filename, before the file extension.

photo.jpg

with:

_final

becomes:

photo_final.jpg

Replace the filename

Replaces the current filename completely and adds automatic numbering.

photo.jpg
image.png
scan.pdf

using project becomes:

project_0.jpg
project_1.png
project_2.pdf

You can change the separator, starting number, and number padding too.

Files inside subfolders

By default, the tool only works with files directly inside the folder you choose.

If you check Include files inside subfolders, it also works through nested folders and renames the files inside them. Folder names themselves are not changed.

The preview shows the relative path so you can see where those files are before running the rename.

Rename order

When automatic numbering is being used, files can be ordered by:

  • Filename A to Z
  • Filename Z to A
  • Oldest modified first
  • Newest modified first

How to use it

Open the page in desktop Chrome or Edge.

Drag a folder onto the page, or click Choose Folder.

Pick whether you want to add a prefix, add a suffix, or replace the filenames completely. Enter the text you want to use and look through the preview before changing anything.

If you want the tool to also go through folders inside the folder you selected, check Include files inside subfolders.

When everything looks right, click Rename Files. Your browser may ask for permission to make changes to the folder. That is normal. The page needs write access so it can rename the actual files on your computer.

Running it locally

There is no build process and nothing to install.

Download index.html and open it in Chrome or Edge.

That is the whole application.

Browser support

The tool uses the browser File System Access API so it can work directly with local folders.

Desktop Chrome and Edge are the main supported browsers. Other browsers may be able to open the page, but direct file renaming may not work.

Privacy

Files stay on your computer. The tool does not upload file contents or filenames to a server. The browser only gives the page access to the folder that you explicitly choose.

Safety

Batch renaming can make a lot of changes very quickly.

There is a preview and some basic filename conflict checking built in, but you should still keep a backup of anything important before running a large rename.

Use at your own risk.

Author

Brian McLendon

https://github.com/eyeofbri

About

A small tool for renaming a bunch of files at once

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages