Open in CoCalc
1
print "William's picture download tool.";
2
print " Accessing camera...\n";
3
$num_pics = `photopc count`;
4
$num_pics = substr($num_pics,0,length($num_pics)-1);
5
print "There are ".$num_pics." pictures in the camera.\n\n";
6
print "Enter filename prefix: ";
7
$pre = <STDIN>;
8
$pre = substr($pre,0,length($pre)-1);
9
print "Writing date file to this directory.";
10
system "date > date";
11
12
for ($i = 1; $i <= $num_pics; $i++) {
13
$z = "";
14
if ($i < 100) {
15
$z = "0";
16
}
17
if($i < 10) {
18
$z = "00";
19
}
20
21
$s="photopc image ".$i." ".$pre.$z.$i.".jpg\n";
22
print $s;
23
system $s;
24
}
25
26
#sub myname;
27
#$me = myname $0 or die "can't get myname";
28