How to Batch Change File Extensions in Mac OS
Have you ever wanted to change a group of files file extensions in Mac OS? For example, lets say you wanted to change a bunch files with a .htm extension to .html, or a group of files from extension tie .JPEG to .PNG. We’ll show you how to easily batch change a group of file extensions on the Mac, without changing the actual file names.
Remember this is only changing the file extension, this is not actually changing the file type or performing any file conversion. We have plenty of articles about various file format and type conversions if you’re interested in that, however. This is also not changing the file names, it is only changing the extension that comes as a file suffix.
We’re going to use the same rename feature that allows batch renaming of files on the Mac but with a few slight modifications to the usage and related system preferences so that it focuses on changing the file extension rather than the file name. It’s a subtle difference but important if all you want to do is maintain file names but change the file extensions.
Batch Changing File Extensions on Mac
- From the Finder of the Mac, pull down the “Finder” menu and go to “Preferences” and then go to “Advanced”
- Check the box for “Show all filename extensions” and then uncheck the box for “Show warning before changing an extension”, then close out of Finder preferences
- Now locate the files or folder of files that you want to change the file extensions for in the Finder and select them all, then right-click (or Control Click) and choose “Rename XX Items…”
- At the “Rename Finder Items” screen choose ‘Replace Text’ and then within the “Find:” section place the initial file extension, and under the “Replace with:” input place the file extension you wish to batch rename all of the selected files to, then click on “Rename”
Assuming you followed the above steps correctly, you will successfully have changed only the file extensions of the selected files, and not changed any of the names.
In the example above we changed a group of image files from having a “.jpeg” file extension to having a “.PNG” file extension, but you can use this with any file extension, whether it’s changing a group of files from having .docx to .doc, .txt to .php, or anything else. The extension you are choosing does not matter, though you’ll obviously want to pick one that is compatible and accurately represents the file type otherwise it may make it unreadable to some applications.
A few important points here: you must have show file extensions enabled on Mac otherwise the file extensions to change will not be visible or found by the replace tool, and secondly you must turn off the file extension change warning otherwise you will be repeatedly confronted with a dialog box to confirm the file extension has changed for each individual file extension change. Beyond that, it’s just a matter of using the batch Rename feature built-in “Find and Replace” functionality as shown.
Once you’re finished changing the group of files file extensions you are free to adjust your Finder Preferences back to whatever setting you’d like. Generally speaking it’s a good idea to leave the extension change warning enabled, however.
You could also accomplish this batch extension changing process through the command line using a variation of this trick, we’ll cover specifics for that in another article.