Jürgen Exner said:
Not sure where your problem is. Many ways, e.g. even a trivial "(1..3)".
If you want to print them in a specific format like e.g. with a leading 0
then check out printf().
I should have been more specific about what I am trying to achieve.
There is a file renaming tool called awxRename which uses Perl Script
for more complex file renaming purposes.
An example: In order to replace the term "Oldname" in all selected
files with the term "Newname", the perl script command in this program
reads
use locale;$file =~s/Oldname/Newname/g;
The program also contains variables like $name for the current file
name and $ext for the current extension. This allows for example to
replace all current file names (no matter what they are) with a new
term - without modifying the extension:
use locale;$file =~s/$name/Newname$ext/g;
However, since I am not an expert in Perl Script, I don't know how I
would achieve adding incremental numbers to the newly named files. The
program does not appear to offer a variable for incremental numbering.
An example:
Oldname.tif
Othername.tif
File.tif
should be renamed to
Photo_01.tif
Photo_02.tif
Photo_03.tif
There may be many of those files (50 or more), so I wouldn't want to
enter the numbers manually.
Can I somehow do this with Perl Script?
Peter