Created
October 12, 2013 13:33
-
-
Save ff6347/6950069 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/opt/local/bin/perl | |
| use strict; | |
| $|++; | |
| my $HOME = glob "~"; | |
| my $OUTDIR = "$HOME/Pictures/From Memory Card"; | |
| my @now = gmtime; | |
| my $stamp = sprintf "%04d-%02d-%02d %02d:%02d:%02d", | |
| $now[5]+1900, | |
| $now[4]+1, | |
| @now[3,2,1,0]; | |
| my $out = "$OUTDIR/$stamp.gpx"; | |
| my @files = glob "/Volumes/NO\\ NAME/WBT202/20*/*.TES"; | |
| # print "$_\n" for @files; | |
| system | |
| qw(gpsbabel), | |
| qw(-i wintec_tes), | |
| (map {; "-f", $_ } @files), | |
| qw(-o gpx), | |
| qw(-F), $out, | |
| ; | |
| if ($?) { | |
| die "exit status is $?"; | |
| } else { | |
| # warn "unlink @files...\n"; | |
| for (@files) { | |
| unlink $_ or warn "cannot unlink $_: $!\n"; | |
| } | |
| system "open", $OUTDIR; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment