move selected item to new folder: Apple Support Communities
apple Verified ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I'm trying to create an action from automator.
but I can't figure out how or is it even possible.
the action list:
selected items(images)->create folder(option to name folder)->move selected items to the created folder.
But here's the problem, I wanted the folder to be automatically created within the existing folder.
Anyone can figure this out?
13 replies
Sign in or join Beachball Help to reply.
- 0
V.K. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
jpma wrote:
I'm trying to create an action from automator.
but I can't figure out how or is it even possible.the action list:
selected items(images)->create folder(option to name folder)->move selected items to the created folder.But here's the problem, I wanted the folder to be automatically created within the existing folder.
which existing folder? please clarify. do you mean the folder where the selected items are located?
Anyone can figure this out?
- 0
jpma ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
yes the folder where the selected items are located
- 0
V.K. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
sorry, lost track of this thread for a while. this is actually pretty easy. the simplest would be to use applescript only but it can be done with automator with only minimal use of applescript. I don't know how to do it without using apple script altogether.
make the following workflow in automator.
1. get selected finder items.
2. run applescript<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}
tell application "Finder"
container of item 1 of input as alias
end tellend run</pre>
3. set variable value.
make a new storage variable and use it in this action.
4. run applescript
<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}end run</pre>
this is adummy action to break the workflow chain.
4. get selected finder items.
5. make new folder.drag the variable you made to the "where" field.
- 0
jpma ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I really appreciate your help.
but as I'm still very clueless with applescript.is there any sample or a better way for me to understand?
- 0
V.K. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
jpma wrote:
I really appreciate your help.
but as I'm still very clueless with applescript.is there any sample or a better way for me to understand?
there is no need for you to understand applescript. Automator contains an action 'run applescript'. It's in the Utilities section. you have to use that action for steps 2 and 4 in the above workflow. just paste the scripts I gave you into the corresponding actions.
- 0
jpma ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I've did everything now and it works.
but how can I add along so that it will remove the original items?
because I highlight 2 item and it indeed create a folder with the 2 item inside, but is there anyway to add along the line to remove the origin 2 item?
Message was edited by: jpma
- 0
- 0
V.K. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
the following will do it.
1. get selected finder items.
2. run applescript
<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}
tell application "Finder"
container of item 1 of input as alias
end tellend run</pre>
3. set variable value for variable1.
make a new storage variable and use it in this action.
4. make new folder. control-click on that action and select "ignore input".
drag variable1 to the "where" field.
5.set variable value for variable2.
this will store the location of the newly made folder in variable2
6. run apple script
<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}end run</pre>
this is to break the flow again.
7. get selected finder items
8. move finder items.
drag variable2 to the "where" field. - 0
jpma ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
It work right,
too bad I can't use cmd + Z to undo it.
But it did the workthank you very much.
- 0
jpma ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
the workflow works fine as I wanted it to be.
But is it possible to change to another folder of destination?originally, is to create folder within the existing open folder.
The script did work correctly for this.However, what if I suddenly decide to create that folder into another destination, how can I do that?
I tried click on the option and selected a destination but it didn't work.
- 0
James Kayten ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I just found this thread. I'm looking for close to the same thing.
What I made was an automator droplet on which I drag a selection of image files of which are then placed into a new nameable folder that's then placed into a predesignated folder.
Here's why: I'm going to photograph kids with Santa over a period of two weeks in multiple locations. I need each child's photos separated for privacy concerns. Photos are captured to a folder on a laptop.
I want my assistant to drag each set of 3-4 shots from the capture folder over a droplet/app that will create a new folder, allow her to give a unique name too it, and then place the new folder into a folder of all that days photos.
However, while I can make this happen with the automator app I created, It only copies the files rather than moves them. This leaves the images to collect in the capture folder unless the originals are deleted each time - it's a ridiculous nuisance and it seems it should be easily remedied - but I can't figure out how!
- 0
emphor ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi,
I'm bumping this thread as I could get V.K's first Automator script to work, but the second script gives me an empty folder in my desired location but no selected files we put in it. I've tried the sequence a few times but no luck. Anyone else had any issues? I'm 98% sure I'm following along correctly.
--
Cheers, Matt
- 0
BDAqua ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi,
Feel free to tart a new question/topic to get he most helpers in on it, not many helpers visit or reply to already solved questions.
