I have some image files that have a messed up extension. The files are of the following format: "filename." "filename.j" "filename.jp"

I need to find all these files which are in several folders and rename all of them to .jpg.

Anyone can show me a quick way to look for all these files? Also once I find them how can I rename all of them to .jpg in batch?

  • two questions, Find, batch rename :)
    – Ruskes
    Nov 30, 2014 at 0:03
  • Finding is my biggest problem at this point.
    – nashmarkt
    Nov 30, 2014 at 0:06
  • ok use terminal and type mdfind .j or mdfind .jp good luck
    – Ruskes
    Nov 30, 2014 at 0:07
  • did it work for you ? if found right click and use show in Finder :)
    – Ruskes
    Nov 30, 2014 at 0:09
  • mdfind .j retuns every file with the letter J in the file anywhere. I need to look specifically in the extension and specifically just look for j and not jpg.
    – nashmarkt
    Nov 30, 2014 at 0:23

1 Answer 1


Assuming you are running Yosemite...

  1. Open a Finder window and navigate to the parent folder that contains all of these files.
  2. Hit CMD and F to convert it to a Spotlight search window.
  3. Select your folder as the search target in the bar just under the toolbar (in the screenshot below I've selected "Downloads"). Unless you changed the setting in the Advanced pane of Finder Preferences it'll default to "This Mac" but it should offer whichever folder you selected in step 1 as an option.
  4. Open the search attribute dropdown by clicking on Kind, search for "File extension", tick it and click OK.
  5. Enter the extension you want to search for. The window should update quickly with your results. Example of Spotlight searching for file extensions
  6. Select all the files it finds, right-click and select "Rename..."
  7. Enter ".j" in the "Find:" box and ".jpeg" in the "Replace with:" box. I'd include the dot at the start of the extension just to make sure it doesn't replace any letters anywhere else in the filename.
  8. Click "Rename". Then "Use .jpeg" at the prompts (unfortunately it'll ask you once for each file). It should rename all the selected files. Example of Finder batch renaming in Yosemite

Then repeat for ".jp".


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .