This is a new feature - there was no mention of it in your original post. So, instead of re-engineering the solution already provided, you can just populate your @renamefiles array with a fresh glob after the renames have completed.
In reply to Re^3: Renaming files sequentially into directory
by hippo
in thread Renaming files sequentially into directory
by Magnolia25
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |