powered by linux .::.: started in 1998 .::.:    


giancarlo erra .: tech homepage :.
Contacts


.: email . info@bluecodes.com
.: icq . 69177714
.: fax . (0039) 06 233218527
Links

.:: http://www.nosound.net
.:: http://www.bluecodes.com
.:: http://www.synesthesiasense.com
.:: http://nolistening.nosound.net
1 .:: homepage
homepage, news, updates.
2 .:: who am I?
something more about me, my life, my friends.
3 .:: the alfalinux project
the alfalinux minidistribution homepage: documentation, downloads, links, related projects.
4 .:: php factory
some works related to the php world: documentation, tutorials, scripts.
5 .:: documentation
documentation/tutorials/articles I wrote or translated.
6 .:: other linux projects
all my linux software & projects.
7 .:: resources
miscellaneous tech resources
8 .:: thanks
people I like to thanks..







:. mass rename







:: mass rename v1.2

(c) 2000 Giancarlo Erra

This software is under the GNU Public License (GPL)



NEWS for MaxOSX users: you can use Mrename also under MacOSX, simply download the .tar.gz linux version, then substitute the mpcmv script with this fixed version! (thanks to Jonathan Dueck)



What is Mass Rename?
Mass Rename is a simple utility (consisting of two shell scripts) to perform an mv (or cp) command to multiple files. It is intended mainly as an automatic and simple way to rename multiple files with a customizable prefix and a progressive number. It is also possible to modify the rename format simply editing one of the scripts. It is easy, complete and efficient, and was written in only 3k of sh code.
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.



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)




:. Download (http) Mass Rename v 1.2 (1k)
:. Download (http) Mass Rename v 1.2 .deb package (5k)





..::..::..::..::..::..::..::..::..::..::..::..::..::..::..::..::..::..::..::..::..::..
© 2002