Function: Renames the selected files (or files in the selected folders) based on the user-set preferences.
Author: Automator World
Notes: It works best as a Contextual Menu Plug-in; copy into ~/Library/Workflows/Applications/Finder/. It also works well as an Application for drag-and-drop use.
It only happens over a network drive by the way. And it’s not just a permission thing because I can rename the file to a different name. It has to do with how the mac handles the rename. It’s a copy, and since in windows case doesn’t matter, you need to be able to overwrite automatically. So what I’m now proposing is to copy the contents locally, renaming, then overwriting the file as I think an action for that already exists.
Comment by Eric — September 12, 2005 @ 8:13 pm
Here’s what I figured out so far if this helps anyone. Maybe someone could help me.
Use this workflow to get the same effect I think you’re trying to achieve:
‘Get Selected Finder Items’ > ‘Rename Finder Items’ | ‘Get Selected Finder Items’ > ‘Get Folder Contents’ > ‘Rename Finder Items’
So here’s how it works. I select some items in the finder then execute the workflow. It takes whatever is selected, which could be some root folder, and renames it. That effectively fixes the problem where only the contents of the folder are renamed. Then the input of the second ‘Get Selected…’ is cut off. Now the ‘Get Folder Contents’ gets all the contents of the selected root folder. Then you can rename that.
Here’s my problem. When you try a rename that Changes the Case, and you want to do it in-place, then OS X throws an error that the filename already exists. I figured out that it’s because OS X is trying to do an alias of the filename instead of actually renaming it like Windows would do. So, I’m confused, but I hope I helped at least a few people.
Comment by Eric — September 7, 2005 @ 8:57 pm
Ah yes– I recall discussions on this a while ago, and don’t recall if there was any solution. I think the consensus was that this is either an Automator bug, or should be a preference like “rename subfolders”.
Comment by Steve — September 6, 2005 @ 5:22 pm
Thanks, but it still didn’t quite work. If I have ‘Repeat for each subfolder found’ checked, it goes into all the subfolders and renames all the documents, but not the folders. When I unchecked ‘Repeat for each subfolder found’ it renamed the folders as well, but only at the top level. :( I’ve tried different combinations of these actions to try to get this to work, but no luck. For the record, what I have is a set of predefined folders and documents for a project template with a placeholder name in front of each folder and document. I want replace all the placeholder names with a real name for every new project. (I’m using A Better Finder Rename now, but wanted to see if Automator could handle this for me instead.)
Comment by symm — September 6, 2005 @ 4:43 pm
Symm - just add as the first step “Get Selected Finder Items”. This will rename everything selected.
Comment by Steve — September 6, 2005 @ 3:02 pm