R
robic0
Your smarter than me TOC...robic0 wrote in
it is an alias of tr
the end still needs work.
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Fatal;
use File::Find;
finddepth(\&f, ".");
sub f
{
return if /^\./ or /lost\+found/;
my $o = $_ ;
y/A-Z/a-z/;
y/a-z0-9._/_/c;
s/^_+//;
s/\.mpeg$/\.mpg/;
s/\.ram$/\.rm/;
s/\.qt$/\.mov/;
s/\.jpeg$/\.jpg/;
s/_\./\./g;
s/\._/_/g;
y/_//s;
y/.//s;
return if $_ eq $o or -e $_;
if (rename $o, $_)
{
print "\n $File::Find::name -> \n $File::Find::dir/$_\n";
}
else
{
print "failed: $!\n"; die "faild to rename $o to $_, left as $o";
}
}
robic0