Macro behaving differently on different OSs

On macOS 10.13.6, the attached macro works as expected:


On macOS 10.14.x the following happens where the variable isn't filled appropriately:


Any thoughts? Thanks.

Backup book watch folder.kmmacros (7.6 KB)

See the Variables user manual section.


You can also use a short form of just %Variable Name% to include variables as long as the variable exists and has a value and there is no corresponding text token, although generally it is better and clearer to use the longer form %Variable%Variable Name% .

In your case, newBookBase variable has no value, so %newBookBase% is not a valid token, and so returns its text unchanged. Same for newBookExt. Probably because the find command is not finding anything.

@peternlewis gave you the answer, but not the solution. :wink:
ALL KM variables should use the full variable token, as in %Variable%MyVariableName%.

Then the token will return an empty string.

Ah! You're right. And the reason the find command wasn't finding anything is because the find path was specific for one computer and not the other.

Thanks for the help.

Thanks for the help. That will be most helpful when debugging next time.