Splitting File System Paths

whatsnew
km8

#1

Keyboard Maestro 8 introduces a new Split Path action.

Basically, this is like a pre-configured Search using Regular Expression action which takes a path and splits it in to its component parts:

  • The parent path
  • The file name
  • The base file name (ie, without the extension)
  • The extension

You can save any of these you are interested in into variables. If you only want one, you can still use the Get File Attribute action, but especially if you want more than one part of the path, this new action is a clearer and simpler way to get the details.


#2

This is one of my favorite new features! It’s simplified dozens of my macros and I use it all the time. Thanks!


#3

Can I plug a variable in as the path? For example, can I copy a file path and then create a variable from the clipboard and then split the file system path from there into other variables…


#4

Absolutely. You can even skip the “create a variable from the clipboard” step and split the clipboard’s contents directly:


#5

Wouldn’t be nice to display the full content of variables on mouse hover? Like tools showing up tooltips.
Thank you.


#6

No!

But I’d go for Option-Hover.  :wink:

-Chris


#7

Option-command or nothing ! :wink: