Help with rename action

Every day I create a folder and in it place 3 files, 1.mpg, 2.mpg and 3.mpg. This folder is copied over from a Windows machine.

I want to create an action that will take those 3 files and rename name to cheese1.mpg, cheese2.mpg, cheese3.mpg.

I can do it if I use 'get selected finder items > Rename Finder items' but I want to use 'Find Finder items > Rename Finder items' so I can search a location and rename the files that match.

The problem is In the finder finder items action, if I enter 3 lines:
'whose name is 1.mpg'
'whose name is 2.mpg'
'whose name is 3.mpg'

Nothing happens as it appears they conflict with each other. I somehow need an 'or' between each line.

What should I be doing?

Posted on Jan 31, 2007 7:26 AM

Reply
10 replies

Jan 31, 2007 7:35 AM in response to Mark_e

I'd download the freeware utility Renamer4Mac and use it to do a simple batch rename.

You can also use the included Applescript, Replace Text in Item Names.scpt, located in the /Library/Scripts/ folder.



Why reward points?(Quoted from Discussions Terms of Use.)
The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

Jan 31, 2007 9:43 AM in response to Mark_e

Hi Mark
Will this help

Find Finder Items
Where (your choice)
Whose: <Extension><is equal to> enter mpg in box

Rename Finder Items
Select <Make Sequential>
check New Name and enter cheese in the box
Place number <after name> start numbers at 1
Separated by <nothing>
Make all numbers enter number of digits

<Extension> etc are drop down menus

chris

iMac 20" Intel Core Duo 2GB RAM Mac OS X (10.4.8) G3 600 iBook 640MB OS X (10.2.8) Lacie d2 60GB & 250GB Firewire Windows XP

Jan 31, 2007 10:04 AM in response to Mike-N-nahyunil

The folder structure is like so:

Folder/A/1.mpg
Folder/A/2.mpg
Folder/A/3.mpg

Folder/B/1.mpg
Folder/B/2.mpg
Folder/B/3.mpg

Assume every day I create a new folder inside /Folder/ and in it I place my 1, 2, 3.mpg plus some other files.

I wanted to set Automator to look in /Folder/ because I didn't want to be manually specifying a new sub folder everyday.

Sure there must be a way for Automator to look in /Folder/ and it's sub folders and find 1.mpg, 2.mpg and 3.mpg and rename them.

It appears the renaming part is easy, it's finding the files. The closest I've got it to use a date attribute, but this assumes I add a new folder everyday and isn't perfect.

Jan 31, 2007 10:28 AM in response to Mark_e

Ok, I think I've got. I had to do some what of a process of elimination:

Finder Finder Items in /Folder/
Name Does NOT contains 'cheese'
Extension is Equal to 'mpg'

Then the sequential renaming. That works, Thanks guys.

It really does though, prove that Apples smart list editors could do with an 'OR' option instead of every new line being 'AND'

Jan 31, 2007 10:45 AM in response to Mark_e

Sure there must be a way for Automator to look in /Folder/ and it's sub folders and find 1.mpg, 2.mpg and 3.mpg and rename them.


There is, but with your current setup-other .mpgs in the same folder-there's no real way to specify those three files in a single action.

An alternative that would probably work out better-put the files into a static folder. That way you can use the Get Specified Finder Items. Then after the Rename-
1.Get Specified Finder Items on the static Folder-
Break the action flow by clicking on Files/Folders and selection Ignore Results.
3. Get Folder Contents
2. New Folder (under your /Folder/ folder)

Then, if you want:
4. Get Specified Finder Items on the static Folder-
Break the action flow by clicking on Files/Folders and selecting Ignore Results
5. Get Folder Contents
6. Move to Trash

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Help with rename action

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.