|
|
@ -15,7 +15,13 @@ my @t = localtime; |
|
|
|
my $daydir = strftime("%Y-%m-%e", @t); |
|
|
|
$daydir =~ s{-[0 ]}{-}g; |
|
|
|
|
|
|
|
my $src = '/media/CANON_DC'; |
|
|
|
my $src; |
|
|
|
if (-e '/media/CANON_DC') { |
|
|
|
$src = '/media/CANON_DC'; |
|
|
|
} elsif (-e '/media/EOS_DIGITAL') { |
|
|
|
$src = '/media/EOS_DIGITAL'; |
|
|
|
} |
|
|
|
|
|
|
|
my $dest = '/home/brennen/photos/' . $daydir; |
|
|
|
|
|
|
|
if ((-e $dest) && (! -d $dest)) { |
|
|
@ -38,7 +44,7 @@ find( |
|
|
|
or die "Copy failed: $!"; |
|
|
|
} |
|
|
|
}, |
|
|
|
'/media/CANON_DC' |
|
|
|
$src |
|
|
|
); |
|
|
|
|
|
|
|
say "$count files copied"; |