MACRO: Increment Number at End of String [Example]
**Requires: KM 8.2.4+ macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))
#### DOWNLOAD Macro File:
<a class="attachment" href="/uploads/default/original/3X/e/1/e1cdae806ba4122830f7c0cb764d9140ba07e9f2.kmmacros">Increment Number at End of String [Example].kmmacros</a>
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
### ReleaseNotes
Macro Author: @JMichaelTX
This is just an example written in response to the below KM Forum Topic. You will need to use as an example and/or change to meet your workflow automation needs.
**MACRO SETUP**
* **Carefully review the Release Notes and the Macro Actions**
* Make sure you understand what the Macro will do.
* You are responsible for running the Macro, not me.
**==USE AT YOUR OWN RISK==**
* While I have given this a modest amount of testing, and to the best of my knowledge will do no harm, I cannot guarantee it.
* If you have any doubts or questions:
* **Ask first**
* Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
Topic Title: Path as a Variable that +1's
URL: https://forum.keyboardmaestro.com/t/path-as-a-variable-that-1s/16785
Date: 2020-01-25
Posted By: beansalad
`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
<img src="/uploads/default/original/3X/9/3/932b8f95d689a7f861de52a37aec6f1d99c62a68.png" width="646" height="1300">
@JMichaelTX This works great! One question I do have is how do I get it to reset back to 0001? I noticed even if I enable and disable it the path picks up from where it left off instead of resetting to 0001.