# fast way to rename files in OSX?

**URL:** <https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552>\
**Category:** Factual Questions\
**Created:** [December 24, 2008, 3:44pm UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552 "2008-12-24T15:44:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanna](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hanna](https://boards.straightdope.com/u/Hanna)\
**Post date:** [December 24, 2008, 3:44pm UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/1 "2008-12-24T15:44:20Z")

</div>

I’m sure this is basic, but I’m in a hurry. How can I rename a bunch of files say, from London 2008 01 to london\_2008\_01? The 01 is consecutive number, so there would be 02, 03 etc.

tia

---

<div class="post-metadata">

**Author:** ![Sunspace](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sunspace/32/1250_2.png) [@Sunspace](https://boards.straightdope.com/u/Sunspace)\
**Post date:** [December 24, 2008, 3:50pm UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/2 "2008-12-24T15:50:46Z")

</div>

Automator? I’m not at my mac, but I think that you can rename files through Automator… whether you can make it take wildcards and do sequential serial numbers, I’m not sure. Failing that, there’s probably some unixy regular-expression magic you can do at the Terminal prompt.

---

<div class="post-metadata">

**Author:** ![Hanna](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@Hanna](https://boards.straightdope.com/u/Hanna)\
**Post date:** [December 24, 2008, 4:04pm UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/3 "2008-12-24T16:04:50Z")

</div>

Thanks. 🙂

I got it to work (loading a bunch of pics to a digital frame for my mom) without renaming.

---

<div class="post-metadata">

**Author:** ![drewbert](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/drewbert/32/15890_2.png) [@drewbert](https://boards.straightdope.com/u/drewbert)\
**Post date:** [December 24, 2008, 4:08pm UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/4 "2008-12-24T16:08:38Z")

</div>

Too late, but if you had felt like spending some money:  
[A Better Finder Rename](http://www.publicspace.net/ABetterFinderRename/)

Probably only worth it if you had to do this sort of thing frequently…

---

<div class="post-metadata">

**Author:** ![Superfluous\_Parentheses](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Superfluous\_Parentheses](https://boards.straightdope.com/u/Superfluous_Parentheses)\
**Post date:** [December 24, 2008, 4:49pm UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/5 "2008-12-24T16:49:07Z")

</div>

open a terminal window.

change the current directory to the one containing the files (in the following, “\>” represents the terminal promp, you should not type it). You can get the directory name in your terminal by dragging and dropping the directory/folder into the terminal window.

\> cd “path to the directory”

Type this code, which will change all spaces to underscores for all filenames starting with “London”  
\> perl -e ‘for (@ARGV) { (new = _) =~ s/ /_/g; rename $\_,$new }’ London\*

---

<div class="post-metadata">

**Author:** ![groo](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@groo](https://boards.straightdope.com/u/groo)\
**Post date:** [December 24, 2008, 9:11pm UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/6 "2008-12-24T21:11:09Z")

</div>

Or Scripts Menu -\> Finder Scripts -\> Replace Text in Item Names.

You may need to launch Applications/AppleScript/AppleScript Utility & check the “Show Script menu in menu bar” box. AppleScript is incredibly useful.

---

<div class="post-metadata">

**Author:** ![TimeWinder](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@TimeWinder](https://boards.straightdope.com/u/TimeWinder)\
**Post date:** [December 25, 2008, 1:59am UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/7 "2008-12-25T01:59:48Z")

</div>

Adobe Bridge (which comes with a bunch of Adobe products) can also do this trick; I think it’s meant for media files, but it works on anything. I’m not suggesting buying bridge for that function, but you might have it lying around.

---

<div class="post-metadata">

**Author:** ![levdrakon](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@levdrakon](https://boards.straightdope.com/u/levdrakon)\
**Post date:** [December 25, 2008, 2:04am UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/8 "2008-12-25T02:04:22Z")

</div>

Adobe Photoshop, if you happen to have it, can do a batch rename.

---

<div class="post-metadata">

**Author:** ![jackdavinci](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/jackdavinci/32/3259_2.png) [@jackdavinci](https://boards.straightdope.com/u/jackdavinci)\
**Post date:** [December 25, 2008, 12:08pm UTC](https://boards.straightdope.com/t/fast-way-to-rename-files-in-osx/478552/9 "2008-12-25T12:08:30Z")

</div>

I personally use the application “R-name” but I think there’s some small fee for download.
