0

Id like to be able to select files(s) from the desktop and be able to choose from the quick menu which sub-folder to move them to. I have this now

enter image description here

But it only gets me Modeling and I want the ability to choose one of the sub folders under Modeling. I had another task below "Move Finder Items" that did give the option to choose the next folder option, but it didn't work (the script would only move the files into Modelling) and now I cant remember what it was to be able to show it. I know this is simple and ive done a lot of looking around online, but Im new to Automator and I cant figure it out....

Thanks much!

Script result:

enter image description here

6
  • There is a Show this action when the workflow runs selection under the action’s options, if that is what you are talking about.
    – red_menace
    Feb 28, 2022 at 1:04
  • so the "show this action" just shows the script as it runs, right?
    – Stumped
    Feb 28, 2022 at 16:20
  • That option will show the action UI, so you can do something like change the location in Move Finder Items, for example.
    – red_menace
    Feb 28, 2022 at 16:58
  • Ok, tks. So I not a coder and dont know what to use before that point..... All I know are the canned Mac Autommator Scripts. Sorry.
    – Stumped
    Feb 28, 2022 at 19:23
  • There isn’t any coding, each action has that option (if appropriate). For example, in your first workflow sample, setting Move Finder Items to show when run will allow you to set a location for the To: field.
    – red_menace
    Feb 28, 2022 at 21:43

2 Answers 2

1

You can insert a Run AppleScript command into your workflow that will get the containing folder of your selected files then gives you the option of choosing any of its sub folders to move your selected files to.

I'd prefer this option because it will work on any file in any folder...Rather than only your "Modeling Folder".

tell application "Finder"
    set selectedFiles to (get selection) as alias list
    if (count of selectedFiles) = 1 then
        set theFile to item 1 of selectedFiles
    else if (count of selectedFiles) > 1 then
        set theFile to selectedFiles
    else
        return
    end if
    try
        set theContainer to (container of item 1 of theFile) as alias
    on error errMsg number errNum
        set theContainer to (container of theFile) as alias
    end try
    set subFolders to folders of theContainer as alias list
end tell

activate
try
    set moveToFolder to item 1 of (choose from list subFolders with prompt "Select Your Destination Folder")
    tell application "Finder" to move theFile to moveToFolder
end try

enter image description here

enter image description here

2
  • Tks much. Ill try this later today when I get some free time. Also, maybe in the future after I use what im trying to get done here, I can can change it up. But what id really like for now is just to be able to right click on the selected file(s) on the desktop, pick the script from the quick menu, have finder open to the parent folder then pick a sub folder from the list to move the file(s) there.... Tks much - this has been driving me nuts!!! as I have 0 automator/programming knowledge and just education myself. thank you again.
    – Stumped
    Feb 28, 2022 at 16:24
  • update: so like I said , im dumb here.... I ran the above script and I have put results up top in the post. Do I have to put it inline or can I just run it by itself? did not work by running by itself..... Sorry.
    – Stumped
    Feb 28, 2022 at 16:34
0

This does it. (unless there is something else going on in the background I cant see - haha - who knows )

answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .