How to name an email attachement with a continously counting number?

Hi @ManyQuestions, if you’re creating your images inside a Split in Batches loop processing one item at a time you could set a file name using the $runIndex variable. This would require the code node though, as you couldn’t access the filename via an expression in the Set node I think.

For example:

This would leave you with files named myNewFileName_0.jpg, myNewFileName_1.jpg, myNewFileName_2.jpg, etc. You can then compress these after the “Merge items” step as suggested over here in your other thread:

1 Like