1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl -w
# Version 0.1
########################################
use File::Spec;
use Image::ExifTool;
#extract date from EXIF
my @ioTagList = ('DateTimeOriginal');
my $exifTool = new Image::ExifTool;
$exifTool->Options(DateFormat => "%Y-%m-%d-%H:%M:%S");
my $info = $exifTool->ImageInfo('Test.jpg', @ioTagList);
my $mydate;
foreach (keys %$info) {
$mydate = $$info{$_};
print "$mydate \n";
}