Ubuntu Geek

Ubuntu Linux Tips,Howtos&Tutorials|Edgy,Feisty,Gutsy,Hardy

  • Subscribe RSS Feed

    subscribe to the ubuntu Geek RSS feed




  • Sponsor

  • Categories

  • Meta

  • Sponsor

  • Archives



  • WidgetBucks - Trend Watch - WidgetBucks.com

mrename - A tool for easy and automatic renaming of many files

Posted by admin on March 24th, 2008

Mass Rename is a simple pair of shell scripts which make it easier to move, rename, or copy multiple files at once. 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 by editing one of the scripts. It is easy, complete, and efficient, and was written only in sh code.

Install mrename in ubuntu

sudo aptitude install mrename

This will complete the installation

Using mrename

Syntax

mrename pattern prefix [option]

mrename Examples

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

to copy each matching file into another with the new name

mrename *.jpg item -c

to rename each file without keeping a copy with the previous name

mrename *.jpg item -m

mrename Options

There are only the following three options.

-c The option -c will copy each file with the new filename.

-m The option -m will move each file in the new filename.

-h Display help.

If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

Related Articles

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>