Move Selected Finder Items to the Specified Folder

Hey Folks,

I've been meaning to post this for a while.

The macro presents a pick-list allowing the user to specify a destination to move the items selected in the Finder.

image

The macro has a default set of paths, which are not likely to work on your system – so you'll need to delete them and start from scratch.

There is a companion macro for adding the selected item to the destination list (See Post #2).

I'm not presently supporting tags in the pick-list, although I will probably add that feature sometime soon.

Note that this version only displays the NAME of the destination folder and not the full path. I will probably change this later and leave the display name entirely up to the user.

-Chris


Updated to v1.01 2021/12/09 00:45 CST


Move Selected Items to Specified Folder v1.01.kmmacros (26 KB)

5 Likes

Hey Folks,

Here's the companion macro to add the selected folder in the Finder to the destinations variable.

-Chris


Move to Specifed Folder -- Add Selected Folder in Finder.kmmacros (9.2 KB)

Keyboard Maestro Export

2 Likes

Cool implementation! Thanks for sharing, Chris.

1 Like

Thank you, awesome macro.

1 Like

Hi Chris. This is a very handy macro. Thank you for sharing it.

One note: if one selects a folder from the pick-list that does not exist, the macro renames the file rather than moving it. Consider adding a folder-exists check before running the Move or Rename File action. Thanks.

1 Like

Yeowch!
:flushed:
Thanks for letting me know.

Should be fixed in v1.01.

Sometime in the future I'll probably change the move mechanism to AppleScript, so it can work with Undo in the Finder.

-Chris

4 Likes

That would be an excellent improvement!

Back to the folder-exist issue: another cool enhancement would be to provide an option to create the folder.

Thanks, Chris!

The companion add folder macro basically does this, and the Finder provides a comprehensive UI – so I think I'll leave that up to the user.

1 Like

If I'm not mistaken, it actually does the opposite, i.e., it adds an existing folder to the pick-list.

,,, yes I get it; that would probably too cute. A simple error message is really the correct approach.

very cool @ccstone !

one think is that at least in my system when the list to create the variable DND_MSI_moveToDestinationFolderPathList is set to when empty (which is the default of the macro i downloaded) it dosent seem to accept the new paths i annually added nor does your accompanying script works.
does that make sense?

best

Z

Hey Z,

Did you change the list in the macro or in the Keyboard Maestro Editor's variable panel?

-Chris

Hiu @ccstone

hmmm here

image

I guess thats the list in the macro, should i have done that in the editor variable panel?

best

Z

Yes, this only populates the variable with a demo set of paths when it doesn't exist already, i.e. on first run of the macro.

Soon I'll change this to work with a file, so the user can use their favorite text editor.

-Chris

gotcha!

i did edit it manually as you mentioned in the KM variable editor:

image

yet when i launch the command it still shows the old example list. anyway no rush ill just wait for the next Version with the text list, sound super convineient :slight_smile:

thx so much as always for all your amazing work, always super appreciate!!

best

Z

Hi @ccstone !

any progress with that?

best and happy new years!

Z

If you look at the screen shot you took here, the list for the original macro has a single underscore for the variable. But the "Add selected folder" macro uses double underscores.

I got it all working once I changed the first macro to use double underscores like in this pic
image

1 Like

If you use this slightly modified version, and just create a duplicate for each path (all triggered by the same hotkey), you will get a conflict pallet instead of the "choose from" picker. Save a keystroke : D

Sorry @ccstone I didn't modify the author, etc comment field because it's such a small tweak. Lemme know if that's not kosher.

Archive.kmmacros (24.3 KB)

Hi Chris, thanks for this really helpful Macro.
Is there a chance to add the possibility for custom names for each path?

Thanks

1 Like

Yes. Look here:

action:Prompt With List [Keyboard Maestro Wiki]

For this section:

How to Store a Different Value than Displayed

By using a double underscore you can add a label.

Choose From List with Labels.kmmacros (5.3 KB)
Keyboard Maestro Export

I'm not going to change the original macro, because I wrote it before I knew the Prompt With List action supported labels.

However I'm planning an update when I have the time and oomph.

You're welcome to take this tip and run with it though.

:sunglasses:

thanks for the hint, I will try to implement this to my workflow. :slight_smile:

1 Like