Projects / massrename

massrename

massrename is a general-purpose utility for batch-renaming file extensions, as well as strings within the base filename (for example, "SomeblehFile.mp3" to "SomeblahFile.mp3").

Tags Systems Administration Utilities
Licenses Artistic
Implementation Perl

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  23 Nov 2006 10:00
  • Rrelease-after

Changes: Minor bugfixes. The README file has been revised. An optional argument "--ignore-case" has been added, allowing massrename to ignore the case of filenames to be renamed at runtime. Debian and Red Hat package formats have been added.

  • Rrelease-mid
  •  14 Jun 2004 01:45
  • Rrelease-after

Changes: An optional argument was added to allow changing to a different directory to rename files, instead of using the current directory. The logfile name was changed to renamed.log. The system's "mv" command is now used to rename by default, however, Perl's internal rename() function can be used by employing a command-line argument. Command-line arguments were added to allow a string to be appended or prepended to the filename. The outdated man page was removed.

  • Rrelease-mid
  •  25 Apr 2004 16:10
  • Rrelease-after

Changes: A bug has been fixed where if a file had more than one extension, e.g. "linux-2.6.4.tar.gz", it would be renamed to "linux-2.6.4.NEWSUFFIX". This release adds a no logging option, an option to include hidden files when renaming, and an option to rename a part within a file instead of the extension (eg: "SomeblahFile.mp3" renames to "SomeblehFile.mp3" with the --from blah --to bleh -w arguments).

  • Rrelease-mid
  •  21 Apr 2004 02:09
  • Rrelease-after

No changes have been submitted for this release.

Rss Recent comments

Rcomment-before 29 Sep 2004 14:59 Rcomment-trans afterstep Rcomment-after

still alive.
Just to let you guys know, no, this project isn't dead, I've currently been working on a c++ port.

Rcomment-before 14 Jun 2004 03:17 Rcomment-trans afterstep Rcomment-after

bugfix
I just realized there was a bug with massrename regarding files with spaces JUST after i released 0.9.6, and I've fixed it just as fast. If you downloaded massrename before 6:00am-ish Eastern Standard Time, re-download it to get the fix.

Rcomment-before 12 Jun 2004 17:06 Rcomment-trans afterstep Rcomment-after

new version soon.
A new version will be released soon, after I implment a few more things and get some kinks worked out.

Rcomment-before 21 Apr 2004 15:52 Rcomment-trans afterstep Rcomment-after

Re: Bash equivalent
You're welcome, and I knew I could do it so much simpler, I'm just boning up on my perl skills.

> Thanks, Christopher. I know the

> frustration of not being easily able to

> do it the good old DOS way: ren *.csv

> *.txt.

>

> In the Bash shell, you can say

>

> for f in *.csv; do mv $f ${f%csv}txt;

> done

>

> I suppose you could paramaterize that in

> a shell script something like

>

> #!/bin/bash

> for f in *.$1

> do

> echo "$f -->

> ${f%$1}$2"

> mv $f ${f%$1}$2

> done

>

> Good old Unix/Bash. You can do anything

> if you're willing to type enough funny

> characters.

Rcomment-before 21 Apr 2004 09:23 Rcomment-trans dolsson Rcomment-after

Bash equivalent
Thanks, Christopher. I know the frustration of not being easily able to do it the good old DOS way: ren *.csv *.txt.

In the Bash shell, you can say

for f in *.csv; do mv $f ${f%csv}txt; done

I suppose you could paramaterize that in a shell script something like

#!/bin/bash

for f in *.$1

do

echo "$f --> ${f%$1}$2"

mv $f ${f%$1}$2

done

Good old Unix/Bash. You can do anything if you're willing to type enough funny characters.

No-screenshot

Project Spotlight

geoipgen

An IP network tool for generating geotargeted lists of IP addresses.

No-screenshot

Project Spotlight

Methanol

A Web crawling system.