Updating file paths for macros

I have a macro that accesses files in a folder. If I move the folder (change the folder path), I assume that all the paths get messed up, and Keyboard Maestro doesn't know where to find the files. Is there a way to tell Keyboard Maestro to update the broken paths? Or even if it prompts me when it cant find a file, that would work. There are just too many paths to go in the macro and find them to update individually.

I have several macros like this, and unfortunately, when I was writing them, I placed the files in desktop folders. Now my desktop is very crowded.

Any help is appreciated. I'm new to this kind of work.

Nothing native to KM. But I have an AppleScript tool that I use to change variable names in a KM macro that might be adapted. Please post a representative sample of your macros, and clearly identify where you want changes to be made.

See post/upload your script/macro.

Hi Michael,
The variables are all over the place and several macros depend on other ones, so that it's quite difficult to trace what macros depend on what files. Probably a result of my poor programming skills.
This might work for me better: Does keyboard maestro have a way to display an error message when the macro can't find a particular file? What happens for me is that KM just aborts with no info on what was the problem. It also does this when I say "click on found image" and the image doesn't exist. It would be nice for KM to display a message like: cannot find image, cannot find file 'particularfile.txt' or have the action box highlighted in red where the macro failed.
Is there such a thing in KM?

Error messages are generally saved/reported in the Engine.log file (Help ➤ Open Logs Folder).

Peter,
Great, that's what I was looking for. Thank you, I appreciate it.
--Ryan

======

Hey R.B.,

Somewhat more user-friendly access to the Engine log.

Open the Keyboard Maestro Engine Log in the Console or BBEdit

-Chris

1 Like

Thanks, Chris. I will take a look at this.

Hey R.B.,

Not per se, but as you now know you can use the Keyboard Maestro Engine log to discover where a non-existent-path failure took place.

If you need to update that path string in a number of places then this macro will come in handy:

Finding Strings in Keyboard Maestro Macro Actions v1.00

Some enterprising person could take the output from the first macro and then use the select-action AppleScript to serially move between the actions in the list – sort of a find-next function.

I may (or may not) refine the macro myself later, but I'm done for now.

-Chris