image
image

Go Back   macosx.com > Mac Help Forums > Switchers (Windows to Mac Converts)

Reply
 
LinkBack Thread Tools
  #9  
Old February 17th, 2007, 07:28 PM
Who, me?
 
Join Date: Feb 2005
Location: Near to Philly.
Posts: 382
Thanks: 0
Thanked 0 Times in 0 Posts
chornbe is on a distinguished road
How about some scripty goodness?

Quote:
#!/usr/bin/perl

my $newname = @ARGV[0];
if( !$newname ){
$newname = "file";
}
my $i = 0;
my @names = `ls | grep \.[Jj][Pp].`;

for( @names ){
chomp;
$i++;
my $iter = "0000" . $i;
my $cmd = "mv \"$_\" $newname" . substr( $iter, length($iter)-4, 4) . ".jpg";
print "$cmd\n";
`$cmd`;
}
Reply With Quote
  #10  
Old May 21st, 2007, 09:00 AM
Registered User
 
Join Date: Oct 2006
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
robyn1 is on a distinguished road
To run the Applescript, select all your files and drop them together on the icon FileName_X. Cool script! Hope Apple puts it in Leopard, and makes another ex-Windows person happier.

Last edited by robyn1; May 21st, 2007 at 09:21 AM. Reason: just worked it out.
Reply With Quote
  #11  
Old May 28th, 2007, 03:52 PM
ex2bot's Avatar
Mac Fanbot
 
Join Date: Apr 2002
Location: live?
Posts: 1,447
Thanks: 1
Thanked 16 Times in 15 Posts
ex2bot is on a distinguished road
Lightbulb Make It Happen

It's strange that multiple rename is not in Finder. If I ever needed to do it, I'd probably make an action with Automator (or use that Applescript). I've attached an example. It literally took me 5 minutes to make and test. And I'm not a programmer. *** USE AT YOUR OWN RISK.** Test it first to make sure it does what you think it does. After all, I spent about three minutes testing it.

You can save this as a Finder plug-in. To use it, run it, select the File menu, select "Save As Plug-in". When you want to rename several files, select them in Finder, right click (or control-click with a one-button mouse), select "Automator" from the contextual menu, and select the name you gave it when you saved it as a plug-in. I called mine "Multiple File Rename".

Automator ROX! Also check out:

http://automator.us

t
Attached Files
File Type: zip MultipleRename.workflow.zip (2.6 KB, 14 views)
__________________
Please click THANKS if you found this information useful.
"Just as some newborn race of super-intelligent robots is about to consume all humanity, our dear old species will likely be saved by a Windows crash. The poor robots will linger pathetically. Windows will apologize to them for the inconvenience." -Anonymous (with modifications)
Reply With Quote
  #12  
Old May 28th, 2007, 05:57 PM
icemanjc's Avatar
I'm Cool, I have a Mac.
 
Join Date: Jan 2007
Location: Ft. Lauderdale, FL
Posts: 1,046
Thanks: 2
Thanked 29 Times in 27 Posts
icemanjc has a spectacular aura abouticemanjc has a spectacular aura about
R-Name Beats All
__________________
Be sure to thank the person that helps you!
MacBook 2.1 GHz , 250 GB, 2 GB, OS 10.6.1
PowerMac G5 Dual 2.3 GHz, 750 GB, 1 GB, OS 10.5.8 Server
PowerMac G4 Dual 1.25 GHz, 120 GB, 100 GB RAID, 1.5 GB, OS 10.5.8 Server
iPod Classic Black 120 GB

Favorite Bands: Anberlin, Five Iron Frenzy
My Site
Reply With Quote
  #13  
Old September 26th, 2009, 10:53 AM
Registered User
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
mikeceo is on a distinguished road
You can do a lot of renaming tasks with Automator but if you want to be faster and need some more flexibility such as previewing new filenames I would go with an add-on utility such as Renamer or Name Mangler.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 08:11 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.