#!/usr/bin/perl -w
use strict;

# Rename files as defined within this script (in @files)

# moore4e_ch02_fig_02_1.jpg
# ->
# fig_ch2_5.jpg

# get all filenames
my @files = glob "datasets/*/*/*";

foreach my $file (@files) {
        my $newfile = lc $file;
        print "$file ===> lc $newfile\r\n";
        rename $file, $newfile;
}
