Skip to main content
4 votes

how to set an initial value when batch renaming to sequential numbering?

A simple approach here is to do: our $i //= 28; That is still declare it as a package global variable to work around strict but only assign 28 if not already defined. Alternatively, with zsh's zmv: ...
Stéphane Chazelas's user avatar
4 votes
Accepted

how to set an initial value when batch renaming to sequential numbering?

As you've already discovered, putting our $i = 28; in the main script doesn't work because it resets $i to 28 for every filename - rename executes every statement in the main script once for every ...
cas's user avatar
  • 83.9k

Only top scored, non community-wiki answers of a minimum length are eligible