collection:Finders_Selection
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| collection:Finders_Selection [2015/12/22 22:22] – ccstone | collection:Finders_Selection [2021/12/07 05:48] (current) – peternlewis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | The // | + | {{:collection: |
| - | In Keyboard Maestro, you work with the Finder Selection | + | ====== Working |
| - | Here are some examples. Set the Finder Label to Red (using the Plug In action for Set the Finder | + | **with |
| - | {{ :action:label-red.png?nolink |}} | + | As you probably know, you can select multiple files and/or folders in the Mac Finder, and then perform a manual operation on the entire selection, like copy, move, delete, apply tags, etc. If you have an operation that you often perform, then Keyboard Maestro can most likely automate that for you. |
| + | |||
| + | ===== Potential Use Cases ===== | ||
| + | |||
| + | Some examples of Keyboard Maestro macros performing operations (actions) on a Finder Selection: | ||
| + | - Move the selected files to another folder you often use for a specific purpose | ||
| + | - Assigning Mac Tags to the selection (can't be done via AppleScript) | ||
| + | - Renaming the selected files using a consistent prefix and number scheme | ||
| + | |||
| + | |||
| + | ===== Setup of the For Each Item Action ===== | ||
| + | |||
| + | In Keyboard Maestro, you work with the Finder Selection by using the [[action: | ||
| + | |||
| + | In the For Each Item Action, you can add one or more of any of the Keyboard Maestro Actions. | ||
| + | |||
| + | {{:collection: | ||
| + | |||
| + | ===== Examples ===== | ||
| + | |||
| + | The // | ||
| + | |||
| + | Note the consistency between the first three examples. And note that you could do all three in a single For Each action | ||
| + | |||
| + | ==== #1 - Move Selected Files ==== | ||
| + | |||
| + | To move the files to the Documents folder, you would do this:\\ | ||
| + | {{ : | ||
| + | |||
| + | ==== #2 - Assign Mac Tags to Selection ==== | ||
| To change the Finder Tags, you would use: | To change the Finder Tags, you would use: | ||
| + | {{ : | ||
| - | {{ : | + | ==== #3 - Rename Selected Files ==== |
| - | To move the files to the Documents folder, you would do this: | + | You could rename |
| - | {{ :action:move-to-documents.png?nolink |}} | + | {{ :action:rename-selected.png?nolink& |
| - | Note the consistency between them. And note that you could do all three in a single For Each action if you wanted (you would have to ensure | + | ==== #4. |
| You can pass each file to a shell script using something like this: | You can pass each file to a shell script using something like this: | ||
| - | {{ : | + | {{ : |
| + | |||
| + | ==== #5. Combining Multiple Actions in One For Each Item Action ==== | ||
| + | |||
| + | This macro will take the selected items in the Finder and perform the following Actions: | ||
| + | - Get the original File Path | ||
| + | - Generate a new sequenced name using the specified Base File Name | ||
| + | - New File Name: `BaseFileName-n.ext` as in "`My Base File Name-1.jpg`" | ||
| + | - Add a Mac Tag to the File | ||
| + | - Rename the file using the text in the `baseFileName` variable and adding a hyphen and a sequential number to it. | ||
| + | |||
| + | The file extension will be retained. | ||
| + | |||
| + | See download link for this macro below. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ===== Downloads ==== | ||
| + | |||
| + | - {{: | ||
| + | |||
| + | ===== See Also ===== | ||
| + | |||
| + | ==== Actions ==== | ||
| + | |||
| + | * [[action: | ||
| + | * [[action: | ||
| + | * [[action: | ||
| + | * [[action: | ||
| + | |||
| + | ==== Collections ==== | ||
| + | |||
| + | * [[collection: | ||
| + | * [[collection: | ||
| + | * [[collection: | ||
| - | There is a [forum topic](http:// | + | ==== Tokens==== |
| - | ###Putting things together### | + | * [[token: |
| + | * [[token: | ||
| + | * [[token: | ||
| - | {{: | + | ==== Forum ==== |
| - | {{ :collection: | + | * [Working with the Finder Selection](https://forum.keyboardmaestro.com/ |
collection/Finders_Selection.1450822975.txt.gz · Last modified: by ccstone
