Rename many files at once

pmotyka

Registered
In Windows, I was able to select multiple files, select rename, specify a name (blah.jpg) and I'd end up with blah.jpg, blah (2).jpg, blah (3).jpg, blah (4).jpg, etc. I'd like know how to do this within OS X.

Please don't suggest a add-on utility, I'd like to do this within Finder without having to launch another application that will over complicate the task at hand with additional options of the use of expressions for filenames.

Simply trying to reproduce a very frequently used feature of Windows.

Thanks!
 

pmotyka

Registered
Is there a free utility I can grab to un-stuff this *.sit file?
 

barhar

Registered
'In Windows, I was able to ...' - this is 'macosx.com' ...

'Please don't suggest a add-on utility, I'd like to do this within Finder without having to launch another application ...' - since 'MacOS X'es 'Finder' does not perform the mentioned 'Window Explorer' function; and, you do not want any advice on any 'add-on utility' or 'another application', the function you desire is not avalible.
 

pmotyka

Registered
'In Windows, I was able to ...' - this is 'macosx.com'
Yes, this is macosx.com, Switcher Forum. A perfect place to find out how to do something in OS X that can be done in Windows.

'
'Please don't suggest a add-on utility, I'd like to do this within Finder without having to launch another application ...' - since 'MacOS X'es 'Finder' does not perform the mentioned 'Window Explorer' function; and, you do not want any advice on any 'add-on utility' or 'another application', the function you desire is not avalible.
Thanks for answering the question.
 

DeltaMac

Tech
I think what barhar left unsaid (I don't know why), is that third-party utilities for file manipulation on the Mac are often created to be work/time savers, and may provide drop-down menus that make the Mac easier to use. An app often doesn't need to be launched - you simply use the drop-down or other menu, or a group of files to rename are simply dropped onto the app's icon. The app does its job with minimal input from you, the user. In this case - an Applescript that performs the same operation, probably with less fuss.
The question that gets beat to death here, is "why doesn't the Mac work like Windows when you (insert your own pet thing that you do on Windows)?" The answer is - the Mac will often have a better way to accomplish the same thing - just ask!
 

chornbe

Who, me?
How about some scripty goodness?

#!/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`;
}
 

robyn1

Registered
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.
 

ex2bot

Registered Bot
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
 

Attachments

mikeceo

Registered
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.
 

phuongtim59

Registered
Yes, this is macosx.com, Switcher Forum. A perfect place to find out how to do something in OS X that can be done in Windows.



Thanks for answering the question.
I accept with information:a group of files to rename are simply dropped onto the app's icon. The app does its job with minimal input from you, the user. In this case - an Applescript that performs the same operation, probably with less fuss.
________________
 
Last edited by a moderator:
Top