add text in clipboard to the fine name as a prefix

I have been trying to create a workflow which add the prefix from the text in the clipboard.
Automator's preset, 'Add Text to Finder Item Names' can't do this.

Any advise or hint would be appreciated.

MP, MBP, Mac OS X (10.6.3)

Posted on Apr 15, 2010 5:54 PM

Reply
4 replies

Apr 15, 2010 7:04 PM in response to hgw99

There are a few alternatives, since the *Rename Finder Items* action doesn't accept variables. This macosxhints article describes a way to trick existing actions into using variables, and you can use third party actions (I have a *Change Names of Finder Items* action if you want to try that - it can be downloaded here). A custom *Run AppleScript* action can also be used.

Apr 15, 2010 11:40 PM in response to red_menace

There are a few alternatives, since the Rename Finder Items action doesn't accept variables.
This macosxhints article describes a way to trick existing actions into using variables, and
you can use third party actions (I have a Change Names of Finder Items action if you want
to try that - it can be downloaded here). A custom Run AppleScript action can also be used.



Hi, thank you for your quick reply red_menace. I actually went through couple of your posts when I was looking for the solution earlier today. I have read the article that you mentioned, but I could barely understand what it is talking about.

I tried your custom Apple Script, -Change name of Finder Items.
Nice. It seems the one I needed.
But I couldn't figure how to define the 'text or variable' box.

I placed 'Get Contents of Clipboard' right above your script as the variable is already stored in the clipboard here. I can't figure out how to put this variable into the box.... Thank you so much and sorry for my ignorance. I need little more help...

Apr 16, 2010 9:24 AM in response to hgw99

The 'text or variable' is just some placeholder text to describe what you can put into the text field. For text, you just type something in, but to use variables you will need to create some. An example workflow would be something like (note the use of the "Ignore Input" option):
1) *Get Selected Finder Items* -- or whatever you are using to get the items to rename
2) *Set Value of Variable* { Variable: _Original Input_ } -- save the input for later
3) *Get Contents of Clipboard* (Ignore Input)
4) *Set Value of Variable* { Variable: Clipboard }
5) *Get Value of Variable* { Variable: _Original Input_ } (Ignore Input) -- get the original input back
6) *Change Names of Finder Items*

The *Change Names of Finder Items* action will not change anything if the change text field is left alone (i.e. set to "the original contents"), so all you need to do in this case is check the "Add text" checkbox, drag the Clipboard variable to the text field, and select the location and separator as desired.

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.

add text in clipboard to the fine name as a prefix

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