1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
MASS RENAME v 1.2
(c) 2000 Giancarlo Erra <rofus@mindless.com>
This software is under the GNU Public License (GPL)
INSTALL:
--------
Change to root if necessary, copy the two files mrename and mcpmv
to your local bin directory (generally /usr/local/bin/), make them
+x (chmod +x) and chown/chgrp to your user/group (if you want so).
Make sure to have your local bin directory in your PATH.
That's all!
USAGE:
------
mrename 'pattern' prefix -c|-p
- 'pattern' is the pattern to search files to rename
(quoted to avoid that bash resolve it)
- prefix is the prefix that will be added to the name of each file
- The option -c will copy each file with the new filename
(cp oldnamed-file newnamed-file)
- The option -m will move each file in the new filename
(mv oldnamed-file newnamed-file)
NOTE:
1) All parameters are needed
2) You have to stay and launch the script in the same
directory of the images. The program should be able
to write in this directory.
Example:
If you have a directory with two jpeg images prof.jpg and forp.jpg
and you want to add them a prefix like item0, item1 etc..
(that is item0prof.jpg, item1forp.jpg etc..) do this:
cd /path/to/the/images
mrename '*.jpg' item -c
to copy each matching file into another with the new name
mrename '*.jpg' item -m
to rename each file without keeping a copy with the previous name
- Note about the format of rename:
The default format is <prefix><progressive-numer><oldname>
To change this please open the mcpmv file and edit to fit
your needs (you will find also an example)
For help/bugs/comments:
Giancarlo Erra <rofus@mindless.com>
http://alfalinux.sourceforge.net
|