Using Automator to Rename Files and Folders

Save yourself some time

Automator is Apple's application for creating workflows. You can think of it as a way to perform the same repetitive tasks over and over. Automator is often overlooked, especially by new Mac users, but it has some powerful capabilities that can make using your Mac even easier than it already is.

Instructions in this article apply to Mac OS X 10.7 and newer.

The new 27 inch iMac with 5K Retina display
The new 27 inch iMac with 5K Retina display. Justin Sullivan/Getty Images News/Getty Images

How to Create the Rename File and Folders Workflow

The Rename File and Folders workflow in Automator can create sequential file or folder names. It's easy to use this workflow as a starting point and modify it to meet your needs.

  1. Launch the Automator application, located in the Applications folder.

    Automator in Finder
  2. Select New Document in the window that pops up when you first open Automator.

    Older versions of Mac OS X don't have the New Document step. You can click on Application first.

    New Document in Automator
  3. Click Workflow.

    Application in Automator
  4. Select Choose.

  5. In the Library list on the left of Automator, select Files & Folders.

    Files & Folders under Library
  6. Drag the Get Specified Finder Items workflow item to the workflow pane or double-click it.

    Dragging command in Automator
  7. Drag the Rename Finder Items workflow item to the workflow pane and drop it just below the Get Specified Finder Items workflow.

    Rename Finder Items in Automator
  8. A dialog box will appear, asking if you wish to add a Copy Finder Items action to the workflow. This message appears to ensure that you understand that your workflow is making changes to Finder items, and to ask whether you want to work with copies instead of the originals. In this case, click the Don't Add button.

    Don't Add button in Automator
  9. You've set up the basic workflow, but you need to make some changes to ensure it does what you want it to do. Start by clicking Options in the Get Specified Finder Items box.

    Options in a task in Automator
  10. Place a checkmark in the Show this action when the workflow runs box. This option opens a dialog box open separately from the workflow so that it's obvious that you need to add files and folders for the flow to use.

    Show this action when the workflow runs option in Automator
  11. In the Rename Finder Items box, click the dropdown menu that's currently showing Add Date or Time.

  12. Select Make Sequential from the list of available options.

    Add Date or Time dropdown menu in Automator
  13. Click the new name radio button to the right of the Add number to option.

  14. Type the root name you want to use for your files in the text box.

  15. Click the Options button at the bottom of the action box.

  16. Select the checkbox next to Show this action when the workflow runs.

    Show the action when the workflow runs in Automator
  17. Adjust the other settings in the action box. These options include:

    • where the number appears in the file name (before or after the name you typed)
    • which number the first file you rename contains
    • whether to separate the name from the number by a dash, period, space, underscore, or nothing
    • how many digits the numbers will contain
  18. The Example field gives a preview of how the files will look based on your choices.

    Example field
  19. The Rename Files and Folders workflow is complete. Now it's time to run the workflow to see if it works properly. To do so, click the Run button located in the top right corner.

  20. The Get Specified Finder Items dialog box will open. Click the Add button.

    Add button
  21. Browse to and select the folders you want to rename.

  22. Click Add.

    Add button
  23. Click Continue.

    Continue button
  24. The Make Finder Item Names Sequential dialog box will open. This window contains the same options you set in the action window, but you'll have a chance to review them to ensure everything looks how you want.

  25. Click Continue to run the workflow.

  26. The workflow will run. The renamed files will appear in the same folder you selected them from.

    Finished renamed files

How to Save the Workflow as an Application

Typically, you'll run workflows within Automator. But to make them even more convenient, you can save them to your computer as standalone applications. Here's what to do to convert this workflow into a drag-and-drop app.

  1. Click the Options button in the Get Specified Finder Items action box if the options aren't already visible.

  2. Remove the checkmark from Show this action when the workflow runs.

    Leave this box marked in the Rename Finder Items action box so you can customize the new file names before you run the workflow.

  3. To save the workflow, select File, Save.

    The keyboard shortcut is Command+S.

    Save command in Automator
  4. Enter a name for the workflow and a location to save it to.

    Save dialog box in Automator
  5. Use the dropdown menu to set the file format to Application.

    Application file form in Automator
  6. Click the Save button.

  7. Now, you can drag and drop files onto this application icon to run the workflow automatically.

    Using an Automator app