# Batch change of extension



## smolz (Feb 6, 2005)

is there a way to change the extension of a bunch of files, i am guessing using a terminal command.  What I want is that I have .m4a files that I want to change to .m4b so I can bookmark them.


----------



## chabig (Feb 8, 2005)

The easiest way is with this applescript:

http://www.malcolmadams.com/itunes/scripts/scripts07.php?page=1#makebookmarkable

Generically, check out the Applescript folder in your Applications folder. There are Finder scripts to deal with filenames.

Chris


----------



## scruffy (Feb 9, 2005)

for file in `ls *.m4a`; do mv $file `basename $file .m4a`.m4b; done

That will work in one directory; it won't recurse down subdirectories.  You'd need to use find for that instead of just looping through the results of ls.  Wouldn't be hard, but I'm too sleepy to look up the syntax.


----------



## vincentpace (Jul 7, 2006)

One really easy way to do it is to use Automator. There are numerous ways to go about it in Automator, depending on what works best for you. One way to do it is to use two Finder actions:

1) Ask for Finder Items (with Allow Multiple Selections checked)
2) Rename Finder Items (Replace Text in Finder Item Names)

When you run it, select the items you want to change and that's it. Alternatively, you could replace Ask for Finder Items with Get Specified Finder Items and specifically drag and drop everything you want to change right into the window.

In either case, a piece of cake.


----------



## Clivey (Jul 8, 2006)

Shareware prog SkoobyRenamer will be of benefit here - (and in a multitude of other situations too .


----------



## ponage (Feb 22, 2010)

skooby renamer did the trick- thanx!


----------

