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