#!/usr/bin/perl
#for ($counter=0; $counter<=200 $counter++) {

###while (defined($nextname = <img_????.jpg>)) {
#while (defined($nextname = <IMGP????.MOV>)) {
#while (defined($nextname = <P11700??.JPG>)) {
while (defined($nextname = <u??.jpg>)) {
  $filein = $nextname;
  $fileout = $filein;
  $fileout =~ s/IMG_/img/;
  $fileout =~ s/u//;
  $fileout =~ s/JPG/jpg/;
  $fileout =~ s/MOV/mov/;
#  $files = sprintf("s%s", $filed);
#  $files =~ s/simg/s/;
  printf("about to generate $fileout from $filein\n");
  `mv $filein $fileout`;
#  `djpeg $filed > deleteme_big.ppm`;
#  `pnmscale .25 deleteme_big.ppm > deleteme_small.ppm`;
#  `cjpeg deleteme_small.ppm > $files`
}

