How to Rename Files from a List on Mac

You have a folder of files and a spreadsheet that says what each one should be called. macOS has no built in way to connect the two. This guide shows two methods that work: a short Terminal script, and Batchio's Rename from List rule with a live preview and undo.

Can you rename files from a list with Finder?

No. Finder's built in Rename option can replace text, add text, or number files in sequence, but it cannot take new names from a list. To rename files from a spreadsheet you need a Terminal script or a batch renaming app that reads a list of names.

Finder is fine for simple patterns, and our guide to batch renaming files on Mac covers what it can do. Names that come from outside the files themselves, such as a product catalog, a shot list, or a client delivery sheet, are exactly where it stops.

How do you rename files from a CSV in Terminal?

Export your spreadsheet as a CSV with the current name in the first column and the new name in the second, save it in the same folder as the files, then run a short loop that reads each row and renames the matching file with mv.

Open Terminal, move into the folder with cd, and run:

while IFS=, read -r old new; do
  mv -n -- "$old" "${new%$'\r'}"
done < names.csv

The -n flag stops mv from overwriting a file that already has the new name, and the ${new%$'\r'} part removes the hidden line ending that Excel adds to every row. Both columns must include the file extension, and the CSV should have no header row. Names that contain commas will break the split, so this method suits simple names best.

The bigger limitation is safety. The script renames immediately, shows no preview, and has no undo. A typo in the spreadsheet is applied to your files before you see it. Our guide to renaming files in Terminal covers more command line options.

How do you rename files from a list in Batchio?

Add your files to Batchio, add a Rename from List rule, and paste the new names, one per line. The first name goes to the first file, the second to the second, and the live preview shows every pairing before you click Rename.
  1. Drag your files or folder into Batchio.
  2. Use the sort control above the file list so the files appear in the same order as your list, for example by name.
  3. Click Add Rule and choose Rename from List.
  4. Copy the column of new names from Excel, Numbers, or Google Sheets and paste it into the field.
  5. Check the preview, then click Rename.

You do not need extensions in the list. Each file keeps its own extension automatically, and if a line includes it anyway, Batchio drops the duplicate. Files beyond the end of your list keep their current names.

How do you match old and new names from two spreadsheet columns?

In the Rename from List rule, switch the match mode to By original name. Paste the column of current names into the left field and the column of new names into the right field. Each file is matched by its current name, so the order of the files does not matter.

This is the reliable choice when your spreadsheet covers only some of the files, or when the files are not sorted the same way as the sheet. Matching ignores upper and lower case, and the current names can be written with or without their extension. Files without a matching row stay exactly as they are.

Because Rename from List is one of Batchio's composable rules, you can keep going after the list is applied, for example adding a number sequence or the date to every new name. If anything looks wrong after renaming, one undo restores all of the original names. The Rename from List feature page covers every option in detail.

Frequently Asked Questions

Can Finder rename files from a list?
No. Finder's Rename Finder Items action can replace text, add text, or apply a numbered format, but it cannot read new names from a list or a spreadsheet. You need either a Terminal script or a dedicated app such as Batchio, which has a Rename from List rule.
How do I rename files from an Excel spreadsheet on Mac?
Put the current file names in one column and the new names in another. In Batchio, add a Rename from List rule, switch it to By original name, then paste the current names column into the left field and the new names column into the right field. Check the live preview and click Rename.
Do the files need to be in the same order as my list?
Only in By order mode, which gives the first name in the list to the first file. If your files and list are in a different order, use By original name instead. It matches every file by its current name, so order does not matter.
Can I undo a rename from a list?
In Batchio, yes. Every rename is recorded, and one undo restores all of the original names. The Terminal method has no undo, so keep a copy of your files before running a script.

Rename Files from Your Spreadsheet Safely

Paste your list, check every new name in the preview, and undo with one click. Batchio is free with all 13 rule types.

Download Batchio
Marcel Iseli
Marcel Iseli

Creator of Batchio · Indie App Developer

LinkedIn ↗

Marcel Iseli is an indie app developer and the creator of Batchio. He builds native macOS utilities focused on productivity and file management.