Can you try it with a simple ls $KMVAR_Path as the shell script action? Does that give you the desires output? (A list of files from all the selected directories.)
Are you executing this macros with Finder in the foreground?
How are you triggering the macro? Shortcut, menu, hitting "try" in KM? (That last one would mean that Finder is not in the foreground, which could be the reason it doesn't work I think.)
i have it set as a status menu item. i focus finder and then press the status menu entry .
I also tried now assigning it a hotkey and launching from finder with no success.
But this brings up the point that @zeltak needs to post his actual macro (or a simplified example on an actual macro that is failing).
Otherwise everyone is just guessing at that the problem might be. We don't even know if the variable in the For Each action is “Path”, or what collection is being used, or whether their is an issue with the specific execute action being used.
zeltak@imbp-50:~|⇒ beet import $KMVAR_Path
error: no such file or directory: /Users/zeltak/music/Moby Grape - Moby Grape 1967/
zeltak@imbp-50:~|⇒
I think maybe the variable Path dosent get updated after the first time i run it, since i get the same output even if i try to beet import another folder
ie i get the
error: no such file or directory: /Users/zeltak/music/Moby Grape - Moby Grape 1967/
Perhaps Moby Grape is where Bash first gets misled by an unquoted space in a path.
To stay on the Bash syntax road, you may need either to escape spaces within paths (Moby\ Grape) or enclose whole paths in bash quotes, for example as in:
Without the context, we can't see what value you have assigned to $KMVAR_selectedPath – it could be ""
You appear to be using 'smart quote' characters (differing to left and right, “ ” for smartly formatted printing), rather than the plain " " used by the shell.
Aa-ha! it was indeed the smart quotes!!!
its weird because thats the quotes my MBP defaults to when i press it..i come from 15 years of linux so didnt even considered that it could be "smart quotes"..not very smart i guess