Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

automator

Hello,

I did not find an automator forum, so I'll post it here, fell free to redirect me if I'm in the wrong place.

Basically, I want to create a workflow that would do the following:

1 - I select multiple files
2 - Automator creates a new folder for each of those files
3 - It renames each folder to the same name as the files.
4 - It places the files in the respective folders.

The problem I have is that I cant figure out how to copy a file name, I haven't found an action for that.

Is it possible to make such a workflow with automator?

Thank you!

F.

15" unibody Macbook Pro, Mac OS X (10.5.6)

Posted on Mar 8, 2010 5:43 PM

Reply
Question marked as Best reply

Posted on Mar 8, 2010 8:11 PM

http://discussions.apple.com/forum.jspa?forumID=1261

Automator Forum is in the 10.5.x Section.

There are some 10.6.x only automator functions such as the "Save as Service" mode,
but otherwise I guess automator is basically the same beast it was before.

Kj
12 replies

Mar 8, 2010 8:38 PM in response to psychedelicwind

this is the right place to ask snow leopard automator questions. snow leopard automator is substantially different from leopard one.

what you want can be done but will require an applescript action.
make the following workflow
1. get selected finder items
2. "run applescript" action
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #ADD8E6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
on run {input, parameters}

repeat with this_item in input
tell application "Finder"
set amb_folder to container of this_item
set cur_ext to name extension of this_item as text
set file_name to text 1 thru -((length of cur_ext) + 2) of (name of this_item as text)
set theFolder to make new folder at amb_folder with properties {name:file_name}
move this_item to theFolder
end tell
end repeat
end run</pre>

Note that if you set up your workflow as an application or a service then "get selected finder items" in front is not needed.

Mar 8, 2010 9:42 PM in response to V.K.

snow leopard automator is substantially different from leopard one.

Some of the developer frameworks and the way the templates are chosen are a little different (services are new, though). The differences don't appear to be enough to warrant a new forum (the version just went from 2.0.4 to 2.1) - did I miss something, or are you just referring to some of the updated actions?

Mar 8, 2010 11:50 PM in response to red_menace

red_menace wrote:
snow leopard automator is substantially different from leopard one.

Some of the developer frameworks and the way the templates are chosen are a little different (services are new, though). The differences don't appear to be enough to warrant a new forum (the version just went from 2.0.4 to 2.1) - did I miss something, or are you just referring to some of the updated actions?

no, you didn't miss anything but IMO those differences are quite substantial enough. But this is really beside the point. sending somebody with snow leopard issues to a leopard forum is extremely bad practice and confuses everybody (I've seen quite a few people getting confused by this just as the OP did). It should not be done for automator or anything else. It's never been organized this way for any subject and there is no reason to start. I mean, there are actually NO differences in "account and login" between leopard and snow leopard. should we get rid of the "account and login" snow leopard forum and send people to the leopard forum? such organizational structure makes no sense.

Mar 9, 2010 10:33 AM in response to KJK555

the solution should be simple - just add an automator forum for snow leopard. or at least put a direct link to the leopard automator forum on the main snow leopard forum page. I've asked the hosts for it a number of time but my requests are not even being acknowledged so I'm not keeping my hopes up.

Mar 9, 2010 3:31 PM in response to V.K.

...or link them all to a common Automator forum. A good percentage of answers wind up including some kind of script action anyway, so perhaps point everything to something in Mac OS X Technologies (most of those forums cover multiple OS releases as well).

I wasn't trying to stir anything up, but I get confused about where to point people, too.

Mar 24, 2010 2:36 PM in response to KJK555

My question is related to the expression "bulk renaming" used in KJK555's posting of Mar 8, 2010. Today I'm interested in adding the same alteration to the names of several files (which happen to reside in one folder). I'm relative new to Apple and absolutely new to Automator, and in my digging around in help pages haven't found anything about such "global changes." I did see the reference to manytricks.com in the Mar 8 post, but I'm naturally predisposed to seek solutions in my own system before going elsewhere.

My sense is that Automator sounds like where this text changing ability should occur (once I create the workflow), but I wonder if it might reside elsewhere.

automator

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