Prompt for Moving Selected Files to One of Seven Folders?

Hello I'm fairly new and I have a question. I'd like to select a batch of files and get a prompt to move them to one of 7 defined sub folders I select in the prompt. Is this possible? This would save me so much time.
My actual workflow consists of dragging the files by hand or opening two finder windows and dragging and dropping.
I'd like to speed up this process because I have to sort a lot of files by hand. They often have no good file names or contents that make sense so Hazel doesn't recognize them automatically.

Yes, this can actually be done fairly easily once you know what actions to use. Here's a quick example to get you started:

Example Macro.kmmacros (4.3 KB)

Prompt

Just replace/modify the sample paths listed in the initial Prompt With List action and you should be pretty good to go.

2 Likes

Awesome. Thank you so much. It works! I just have another small question: Is it possible to shorten the paths? Is there some %-magic I can do? The paths in use are iCloud paths like
/Users/xxxxxxxxxx/Library/Mobile Documents/com~apple~CloudDocs/DaZ/Materialien/Kleidung/

This makes it very hard to find the right folder...

You're welcome. Yes, it is possible to show shorter names in the prompt, but at the expense of a slightly more complex macro and the loss of the ability to just list the folder paths in a single location. With this method, you list whatever names you want to use for each folder, then use separate hardcoded Switch or Case actions (colored in orange to help differentiate them) that correspond to the full folder path:

Example Macro.kmmacros (6.2 KB)

1 Like

Thank you, awesome. I've something to tinker... :slight_smile:

1 Like

Hi @gglick @Johnkree - you can simplify things considerably and keep the original solution by using the Prompt with List feature that allows you to display one thing in the list but return another thing entirely. So for example having

   An Item__A

in the list would display A as a choice but return An Item if that was chosen. Just make sure the two things are separated by two underscore characters.

To use the OP's example:

It's explained better in the KM wiki page action:Prompt With List [Keyboard Maestro Wiki] - look in the section "How to Store a Different Value than Displayed".

2 Likes

Thanks for the reminder, @tiffle. It's been so long since I used that double underscore trick I'd forgotten all about it. This is definitely a much better way to go:

Example Macro.kmmacros (4.7 KB)

And thanks to the new KM10 filters, we can also easily show just the folder's top-level name in the final results window:

3 Likes

I only remembered because I was using it myself the other day!

Hey Guys,

I don't think I'm using the double-underscore technique in this one. If not I'll probably adapt it sometime soon.

Move Selected Finder Items to the Specified Folder

-Chris

2 Likes

This is working flawlessly. I'm loving it. Thank you so much!

1 Like