|
|
Can I Mass-Rename with OSX?
|
|
|
|
Senior User
Join Date: Jun 2007
Location: Aberdeen, UK
Status:
Offline
|
|
I have an external hard-drive with about eight-hundred video files, all of which share the same basic naming-scheme ("Season x, Episode xx - "Episode Name".avi"). I was wondering if there was a way to mass-rename the all, somewhat akin to a search and replace? I could do it one file at a time, but the thought of it is too great.
Any ideas on how to do it all at once?
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
Automator:
You'll have to traverse any folder hierarchy you have but far easier to select all the files in one folder and rename them all at once, then the files in the next folder you open, etc., than to do it one at a time.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: May 2005
Location: Somewhere they can't find me
Status:
Offline
|
|
|
"Believe nothing, no matter where you heard it, or who has said it, not even if I have said it, unless it agrees with your own reason and your own common sense."
Buddha
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
If you need something more, you can also do this via a shell script.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: May 2001
Location: Brisbane, Australia
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jun 2007
Location: Aberdeen, UK
Status:
Offline
|
|
I tried JKT's method, and it worked perfectly for me. Many thanks for all your advice everyone. Next time I have this problem (hopefully there won't be one--I intend to name my files better from now on), I might try one of the other solutions suggested.
Again, thanks for the help everyone!
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2006
Status:
Offline
|
|
Originally Posted by JKT
Automator:
You'll have to traverse any folder hierarchy you have but far easier to select all the files in one folder and rename them all at once, then the files in the next folder you open, etc., than to do it one at a time.
That looks cool - how do I take a bunch of weirdly (arbitrary) named files and rename them file1, file2 etc?
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by peeb
That looks cool - how do I take a bunch of weirdly (arbitrary) named files and rename them file1, file2 etc?
If there is no way to do this using Automater, I can help you do this through your Terminal.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2006
Status:
Offline
|
|
Thank you Besson - I was just curious to know whether there was a simple way, and don't actually need to do it right now, so I won't trouble you - appreciate the offer though.
|
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status:
Offline
|
|
Originally Posted by besson3c
If there is no way to do this using Automater, I can help you do this through your Terminal.
Haven't tested it, but this seems as though it would do it:
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2006
Status:
Offline
|
|
Wehey - that's what I want - thanks!
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status:
Offline
|
|
Originally Posted by besson3c
If there is no way to do this using Automater, I can help you do this through your Terminal.
Since Automator can run shell scripts, you can do that in Automator too
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Aug 2006
Status:
Offline
|
|
if i may ask, how would you go about accomplishing this is the terminal?
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Originally Posted by MacLover08
if i may ask, how would you go about accomplishing this is the terminal?
Something like this:
count = 1;for i in /path/name/*; do mv $i file_$count; count++; done
Haven't tested it, but I'm sure it's pretty close to functional if not already so.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2003
Location: Melbourne, AU (from Bristol UK)
Status:
Offline
|
|
If you use the vastly superior zsh instead of bash, then you can put "autoload zmv" into your .zshrc and get zmv for free.
Usage:
zmv [OPTIONS] oldpattern newpattern
where oldpattern contains parenthesis surrounding patterns which will be replaced in turn by $1, $2, ... in newpattern. For example,
zmv '(*).lis' '\$1.txt'
renames 'foo.lis' to 'foo.txt', 'my.old.stuff.lis' to 'my.old.stuff.txt', and so on. Something simpler (for basic commands) is the -W option:
zmv -W '*.lis' '*.txt'
This does the same thing as the first command, but with automatic conversion of the wildcards into the appropriate syntax. If you combine this with noglob, you don't even need to quote the arguments. For example,
alias mmv='noglob zmv -W'
mmv *.c.orig orig/*.c
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Cool... file operations based on Perl regular expressions?
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2007
Location: ZZ9 Plural Z Alpha
Status:
Offline
|
|
I find R-Name to be excellent for doing this. Donationware...
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status:
Offline
|
|
FYI guys, there's a tutorial on how to rename on the AUTOMATOR.US website. Also contains a lot more information on Automator and free downloads. Check out AUTOMATOR.TV for videos. Enjoy!
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Dec 2006
Status:
Offline
|
|
Personally, I like this program:
A Better Finder Rename
It functions as part of your contextual menus in the Finder, and has an INSANE amount of easy-to-use file renaming schemes to pick from. You can also create droplets for renaming schemes that you might use regularly. I haven't heard of the other ones that were mentioned though; definitely worth checking out!
|
|
|
|
|
|
|
|
|
Registered User
Join Date: Jan 2006
Status:
Offline
|
|
Another vote for A Better Finder Rename. Indispensable app.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|