www.Michael-Forman.com

ren-renum>>  Click to open

Name ren-renum
Version 1.4
Updated 2003/04/05 05:44:24
RCS ren-renum,v 1.4 2003/04/05 05:44:24 forman Exp forman
Rating star star star no star no star
Category File manipulation
Description ren-renum renames files by renumbering digits in the filename. This is useful for renumbering files that contain sequential numbers in the filename such as with pictures.
Download ren-renum

Title
forman:1> ls
image-20031225-07.jpg  image-20031225-09.jpg  image-20031225-12.jpg

forman:2> ren-renum -s 2 -o 25 image*jpg

forman:3> ls
image-20031225-25.jpg  image-20031225-26.jpg  image-20031225-27.jpg

forman:3> ren-renum -s 1 -o 123 image*jpg

forman:4> ls
image-123-25.jpg  image-124-26.jpg  image-125-27.jpg
Scroll
REN-RENUM(1)   User Contributed Perl Documentation   REN-RENUM(1)



NAME
       ren-renum - renames by renumbers files with digits in the
       filemane

SYNOPSIS
       ren-renum [ -dhv ] [ -t ] [ -s [string number] ]
       [ -i [increment] ] [ -o [offset] ] [file ...]

DESCRIPTION
       ren-renum renames files by renumbering digits in the file­
       name.  This is useful for renumbering files that contain
       sequential numbers in the filename such as with pictures.

OPTIONS
       -h --help

       Prints this information.

       -i --increment [increment]

       Set the increment value.  The default value is "1".

       -s --string [string number]

       Specifies which numerical string in the filename should be
       operated upon.  For instance, the file "20020323-Pho­
       tos-07.jpg" has two numerical fields, "20020323" and "07"
       corresponding to string number "1" and "2" respectively.

       A string number of "0" is a special case which always
       matches the last digit in the filename.  If  the string
       number is unspecified, this is the default.

       -o --offset [offset]

       The value "offset" will be used as the numeric string in
       the first file.  The default value is "0".

       -t --test

       Prints what will happen without performing the operations.

       -v --version

       Print version information.

EXAMPLE
       Several examples are presented below in order of increas­
       ing complexity.  For brevity, the commands are shown first
       followed immediately by the modified filenames.

       ren-renum 2002-File-3.jpg 2002-File-7.jpg
                 2002-File-0.jpg 2002-File-1.jpg

       ren-renum -o 5 2002-File-3.jpg 2002-File-7.jpg
                      2002-File-5.jpg 2002-File-6.jpg

       ren-renum -o 9 -i 2 2002-File-3.jpg  2002-File-7.jpg
                           2002-File-09.jpg 2002-File-11.jpg

       ren-renum -n 1 -o 9 -i 2 2002-File-3.jpg 2002-File-7.jpg
                                09-File-3.jpg   11-File-7.jpg

BUGS
       None.

SEE ALSO
       ren-renum

AUTHOR AND COPYRIGHT
        Michael Forman  http://www.Michael-Forman.com

        Copyright (C) 2002, 2003 Michael Forman.  All rights reserved.
        This program is free software; you can redistribute it
        and/or modify it under the same terms as Perl itself.
        Please see the Perl Artistic License.

VERSION
        Current Revision:  $Revision: 1.4 $
        Last Modification: $Date: 2003/04/05 05:44:24 $



perl v5.8.1                 2004-03-16               REN-RENUM(1)




Copyright © 2008 Michael Forman