Distribute File name to different files within the same folder (in combination with Hazel)

Going very slightly off-topic (but might be of benefit to people reading this thread).

I always found/find the For Each Action quite confusing as it uses a user-defined variable at the start but in examples it looks like this variable has to have a certain name (when in fact it can be called anything, as long as that name follows through in the following Actions).

image

To make user-defined Variables easier to spot I really like JMichaelTX's naming convention of having a prefix followed by two underscores when creating Variables. So, in the above example I would name the Variable LocalFile as LOCAL__File. It makes the Variables easy to spot as Variables rather than Tokens and much easier/safer to automate a Find and Rename of all the Variables in a Macro. The two underscores also have the effect that if the Variable is used in a User Prompt the prefix will be hidden.

Apologies again for going off-topic in a thread that is already solved but this one tip has been incredibly useful to me in building Macros and in understanding what the different parts of a Keyboard Maestro Action are actually doing.