Skip to content

Instantly share code, notes, and snippets.

@jkatricak
Created January 29, 2011 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkatricak/802187 to your computer and use it in GitHub Desktop.
Save jkatricak/802187 to your computer and use it in GitHub Desktop.
Convert filenames from upper to lower case, strip out parens and apostrophes
#!/usr/bin/perl
foreach $argnum (0 .. $#ARGV) {
$tmp = $ARGV[$argnum];
$ARGV[$argnum] =~ tr/A-Z/a-z/;
$ARGV[$argnum] =~ s/\(//g;
$ARGV[$argnum] =~ s/\)//g;
$ARGV[$argnum] =~ s/\'//g;
print "$tmp\n";
system("mv \"$tmp\" \"$ARGV[$argnum]\"");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment