#!/usr/local/bin/perl @dir=readpipe("dir images\\*.jpg /O:N /B"); $files=@dir; for($inc=0;$inc<$files;++$inc) { $line = @dir[$inc]; chomp($line); ($name,$ext)=split('\.',$line); if ($ext eq "jpg") { $line =~ s/.jpg//; (@temp)=split('\_',$line); $year=substr @temp[2],7,4; $date=substr @temp[2],3,4; $time=substr @temp[2],11,6; $newname=$year.$date."\_".$time; system("gdalwarp -s_srs \"+proj=longlat +datum=WGS84 +no_defs\" -t_srs \"+proj=laea +lat_0=90 +lon_0=100 +ellps=sphere +x_0=0 +y_0=0 +units=m +no_defs\" -tr 15 15 -rn -srcnodata 0 -dstnodata 0 images\\$line.jpg $newname.tif"); } }