Skip navigation

move selected item to new folder

3825 Views 13 Replies Latest reply: Jan 16, 2012 6:09 PM by BDAqua RSS
jpma Level 1 Level 1 (55 points)
Currently Being Moderated
Aug 15, 2009 10:31 PM
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?
mbp 2.66Ghz(Early 2009), Mac OS X (10.5.7)
  • V.K. Level 9 Level 9 (56,120 points)
    Currently Being Moderated
    Aug 16, 2009 7:10 AM (in response to jpma)
    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?
    Mac Pro 3.2 GHz, Mac OS X (10.5.8), Mac Pro 2.66GHz, powerbook G4 1.5GHz
  • V.K. Level 9 Level 9 (56,120 points)
    Currently Being Moderated
    Aug 17, 2009 1:55 PM (in response to jpma)
    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 tell

    end 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.
    Mac Pro 3.2 GHz, Mac OS X (10.5.8), Mac Pro 2.66GHz, powerbook G4 1.5GHz
  • V.K. Level 9 Level 9 (56,120 points)
    Currently Being Moderated
    Aug 18, 2009 6:56 AM (in response to jpma)
    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.
    Mac Pro 3.2 GHz, Mac OS X (10.5.8), Mac Pro 2.66GHz, powerbook G4 1.5GHz
  • V.K. Level 9 Level 9 (56,120 points)
    Currently Being Moderated
    Aug 20, 2009 10:19 AM (in response to jpma)
    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 tell

    end 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.
    Mac Pro 3.2 GHz, Mac OS X (10.5.8), Mac Pro 2.66GHz, powerbook G4 1.5GHz
  • James Kayten Level 1 Level 1 (0 points)
    Currently Being Moderated
    Nov 8, 2009 5:16 PM (in response to V.K.)
    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!
    MacPro 2.6, Mac OS X (10.5.6)
  • emphor Calculating status...
    Currently Being Moderated
    Jan 16, 2012 4:54 PM (in response to V.K.)

    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

  • BDAqua Level 10 Level 10 (114,790 points)
    Currently Being Moderated
    Jan 16, 2012 6:09 PM (in response to emphor)

    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.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.