#! perl -wT use CGI; use CGI::Pretty; use strict; use File::Basename; #so I can use dirname(); use DirHandle; #so I can use opendir(); use strict; # eventual the path will come from an env variable from a calling webpage my $path=dirname('c:/pictemp/start.gif'); my @files; opendir(DIR, $path); @files = readdir(DIR); # This ugly section drops the '.' and '..' from the directory array. # It looks juvenile, but it works. my $junk; if ($files[0] eq '.' ) { $junk = shift @files; } if ($files[0] eq '..' ) { $junk = shift @files; } my $query = CGI->new(); print $query->header( "text/html" ), $query->start_html(-title => "Renaming Digital Photos", -bgcolor => "#ffffcc" ); print "