How to Rename Several Files at Once in macOS

Discussion in 'Mac Blog Discussion' started by MacRumors, Jan 4, 2019.

  1. MacRumors macrumors bot

    MacRumors

    Joined:
    Apr 12, 2001
    #1
    [​IMG]


    [​IMG]
    In early versions of Mac OS, users looking for a way to quickly rename multiple files simultaneously (commonly referred to as batch renaming) had to use the command line or download and install a third-party tool dedicated to the task.

    Since OS X Yosemite however, Apple has integrated several useful batch renaming capabilities directly into Finder.

    To rename several files of the same kind on your Mac at once, follow the steps below. In our example we're going to be batch renaming some photos.

    1. Open a Finder window and locate the files you want to rename.
      Drag a selection box over the files with your mouse or hold the Shift key and click them one by one.
      [​IMG]

      Click the Action button in the Finder toolbar. Alternatively, right-click (or Ctrl-click) one of the selected files in the Finder window.
      [​IMG]

      Select Rename [XX] Items in the menu.
      Select Format from the first dropdown menu in the Rename Finder Items panel.
      [​IMG]

      In the next dropdown, select a Name format. We're going to use Name and Index, but you can optionally select Name and Counter or Name and Date.
      [​IMG]

      Enter a common name for your files in the Custom Format field.
      [​IMG]

      Enter a starting number for the file series in the Start numbers at field. Note that if you selected a number format, you can use the Where dropdown to choose whether the sequential numbers appear before or after the common name of your files.
      Make sure you're happy with the preview example at the bottom of the Rename panel, then click Rename.
      [​IMG]
    The selected files will now be renamed with your chosen nomenclature. Note that if you're note happy with the change, you can select Edit -> Undo Rename in the Finder menu bar or press the keys Command-Z to revert the files back to their original names.

    How to Add Text to Existing File Names
    Finder's renaming tool also lets you add supplementary text to filenames without changing their original titles.


    [​IMG]

    Simply select the files whose names you want to adjust and bring up the Rename Finder Items panel as described above, only select Add Text from the from the first dropdown instead. Then just type in the additional text in the input field.

    How to Search and Replace Text in File Names
    Finder also allows you to rename only certain files whose names include a certain piece of identifying text. This is particularly convenient if you have tens or hundreds of files in a folder with different names and you only want to change those files that contain a particular word.


    Select all the files in a folder (make sure they're all of the same kind, or this won't work), bring up the Rename Finder Items panel in the same way as before, but this time select Replace Text in the first dropdown.

    [​IMG]

    Now simply type the identifying text you want to replace into the Find field, and enter the text you want to replace it with in the Replace With field, then click Rename.

    Article Link: How to Rename Several Files at Once in macOS
     
  2. Col4bin macrumors 68000

    Col4bin

    Joined:
    Oct 2, 2011
    Location:
    El Segundo
    #2
    This is actually pretty cool. As a graphic designer who sometimes deals with hundreds of photos and other creative assets per project, this is a great way to efficiently sort and organize files.
     
  3. CJM macrumors 65816

    CJM

    Joined:
    May 7, 2005
    Location:
    U.K.
    #3
    That’s cool. Lots of great tips that even as a long time user I didn’t know about. Thanks!
     
  4. Abstract, Jan 4, 2019
    Last edited: Jan 4, 2019

    Abstract macrumors Penryn

    Abstract

    Joined:
    Dec 27, 2002
    Location:
    Location Location Location
    #4
    Automator!?!?!?

    It’s like Apple built in a few Automator scripts into Finder, because I had 2 scripts saved from back in 2006 for exactly this purpose: batch renaming files, and replacing words in filenames with other words. I’m not a programmer or anything, but Apple made Automator so easy to use!!

    I used my Automator for naming imported photos using a specific format I liked (YYYY-MM-DD, photo number starting from 001, then Custom text/title), as well as renaming songs in music albums a certain way (01. Artist Name - Song Name), etc.

    This looks good too; better in some ways, but worse in others.
     
  5. Ovedius, Jan 4, 2019
    Last edited: Jan 4, 2019

    Ovedius macrumors 6502

    Ovedius

    Joined:
    Aug 2, 2012
    Location:
    Norway
  6. Macyourdayy macrumors 6502

    Macyourdayy

    Joined:
    Sep 9, 2011
    #6
    Thanks for the how to's guys. I'm surprised how many things I didn't know about, as well as how many I do.
     
  7. velocityg4 macrumors 601

    velocityg4

    Joined:
    Dec 19, 2004
    Location:
    Georgia
    #7
    This is something much simpler in Windows. Highlight a group of files, right click on one, choose rename, the rest get the same name with numbers. If you start one with a number in brackets or is it parentheses . The rest get higher numbers.
     
  8. MacBH928 macrumors 68030

    MacBH928

    Joined:
    May 17, 2008
    #8
    how can I mass convert file formats?
    need to convert RTFD to TXT
     
  9. Big Ron macrumors 6502

    Big Ron

    Joined:
    Dec 7, 2012
    Location:
    United Kingdom
    #9
    So what, this is a Mac forum.
     
  10. TwoBytes macrumors 68030

    TwoBytes

    Joined:
    Jun 2, 2008
  11. velocityg4 macrumors 601

    velocityg4

    Joined:
    Dec 19, 2004
    Location:
    Georgia
    #11
    I just found it interesting since macOS is usually more intuitive. That Apple implemented a more roundabout solution for this.
     
  12. QCassidy352 macrumors G4

    QCassidy352

    Joined:
    Mar 20, 2003
    Location:
    Bay Area
    #12
    Or, to repeat what others have said, Automator has been able to do this since forever. Didn’t know about doing it directly in the finder tho - that’s cool.
     
  13. neliason macrumors 6502

    Joined:
    Oct 1, 2015
    #13
    Much simpler and less robust. That is a pretty standard trade off.
     
  14. DogHouseDub macrumors 6502

    DogHouseDub

    Joined:
    Sep 19, 2007
    Location:
    SF
    #14
    In addition, if the Finder options are insufficient, 3rd party apps like Name Mangler and FileBot provide expanded options for batch renaming. Both have worked well for me.
     
  15. iSneeze67 macrumors newbie

    iSneeze67

    Joined:
    Apr 8, 2016
    Location:
    California
    #15
    Anyone know of a way to do this in iOS? For my workflow needs this is the one thing that is holding me back from going all in on iPad. Just so much easier to do this one simple function in macOS than iOS. IOS 13 please?!
     
  16. pecuriosity macrumors newbie

    pecuriosity

    Joined:
    Jan 4, 2019
    #16
    Terminal > cd to folder with RTFD files > for file in *.RTFD; do mv "$file" "${file%.rtfd}.txt"; done
     
  17. fairuz macrumors 68000

    fairuz

    Joined:
    Aug 27, 2017
    Location:
    Silicon Valley
    #17
    Well, there was no Automator before Tiger :D
    --- Post Merged, Jan 4, 2019 ---
    That doesn't change the format, only rename the file.
     
  18. Bokito macrumors regular

    Joined:
    May 29, 2007
    Location:
    Netherlands
    #18
    Automator might be able to do this too, but Apple will likely kill that app this or next year in favor of the iOSification of macOS and will replace it with the Shortcuts app I guess.
     
  19. VulchR macrumors 68020

    VulchR

    Joined:
    Jun 8, 2009
    Location:
    Scotland
    #19
    NameChanger (https://mrrsoftware.com/namechanger/) works very well and is free (although one can donate to support the app's development).

    I am scientist and often have to rename large batches of data files (Apple's sh does not handle spaces in filename very well ...) and this app has worked flawlessly. FWIW I have no conflicts of interest in recommending the app.
     
  20. doctor-don macrumors 65816

    Joined:
    Dec 26, 2008
    Location:
    Georgia USA
    #20
    Using one of the PHOTO RESCUE apps, I have renamed and renumbered a large number of images automatically. It's been quite some time ago, so I don't remember exactly which app, but it might have been Image Rescue.
    The problem with batch renaming (as in the built-in function) is that it needs to be done while being able to view the files so that it can be named appropriately.
     
  21. ignatius345, Jan 5, 2019
    Last edited: Jan 5, 2019

    ignatius345 macrumors 68000

    Joined:
    Aug 20, 2015
    #21
    Nitpicky here, but I would recommend command-click instead of shift-click. If you select two non-adjacent files with shift-click, it will select all of the files in between. Great if you want that, but if you don't, go with command-click for selecting items one by one.
    --- Post Merged, Jan 5, 2019 ---
    Same. Photoshop has some built-in file renaming capabilities but (par for the course for Adobe) it's a bit convoluted and harder to set up.

    For next-level file renaming past what Finder can do, A Better Finder Rename has lots of additional features.
    --- Post Merged, Jan 5, 2019 ---
    I think this is more intuitive in that it's called out in the interface and walks you through the options.
     
  22. Spoon! macrumors 6502

    Spoon!

    Joined:
    Dec 9, 2018
    #22
    I prefer A Better Finder Rename: http://www.publicspace.net/ABetterFinderRename/index.html (but it's not free)
     
  23. VulchR macrumors 68020

    VulchR

    Joined:
    Jun 8, 2009
    Location:
    Scotland
    #23
  24. Spoon! macrumors 6502

    Spoon!

    Joined:
    Dec 9, 2018
    #24
    Some things are worth paying for. I use it every day.
     
  25. ShinySteelRobot macrumors regular

    ShinySteelRobot

    Joined:
    Jul 22, 2002
    Location:
    Upper Left Corner, USA
    #25
    RTFD "files" are actually directories containing text files along with (optionally) their attachments. Renaming that folder with a "*.txt" extension is probably going to make TextEdit a bit confused.

    https://en.wikipedia.org/wiki/Rich_Text_Format_Directory
     

Share This Page