Can't Select File for Write to File Action

I'm guessing I'm missing something simple here—apologies for the dumb question, and thanks in advance for any advice!

I have a macro that worked just fine when the file it targeted was in my Documents folder. However, I now need to target a file in an app's /Users/ryanjamurphy/Library/Application Support/ directory—but when I go to select the file for the "Write to File" action, it is greyed out. If I use brute force/ignorance and hit the "Save" button in the dialog, KM prompts me with a "File already exists... replace?" warning. Yet, even then, the macro fails.

I'm guessing this is a permissions issue? I gave KM and KM Engine both full disk access, but can't think of what else I'd need to do to say "yes, please, have at it!" to KM.

(The file's a .css file, and it's for toggling a CSS feature in Obsidian).

I'd still like to figure this out, but I thought of a workaround: write to the file via AppleScript. So, I put the text I wanted to write in a variable and used Execute AppleScript to achieve the same function.

I'd still love to know why KM can't write to my Application Support files, even with full disk access... maybe I just need to reboot?

Hey Ryan,

What version of macOS?

What version of Keyboard Maestro?


1 Like

Hey @ryanjamurphy,

BTW – I can do this without any problem on macOS Sierra and Mojave.

One thing you have to know is that the Prompt for File action is that it does NOT create a file. It only creates a path to an imaginary file in the target.

You have to actually write to the file for it to be created.

If a file by that name already exists at the given location you'lll be asked if you want to overwrite it.


Keyboard Maestro Actions.kmactions (939 B)

1 Like

Sorry, missed these posts! Thanks for the attention. I no longer need the workflow but I hope your solution is useful to someone else!

1 Like