Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Find Photos Taken During A Certain Time Range

by haukex (Bishop)
on Jul 30, 2020 at 19:18 UTC ( #11120082=note: print w/replies, xml ) Need Help??


in reply to Find Photos Taken During A Certain Time Range

When I tried it in my home directory as a test, it did exactly what I expected but when I changed '.' to '/' it started generating every file on the system (directories, text files, etc.) without the date.

That seems strange; I don't have Cygwin but I can't reproduce the issue on Linux, so it could maybe have something to do with the interaction of Cygwin and File::Find::Rule. Is the code you showed here exactly what you're running? Unless another Monk with Cygwin can reproduce the issue and find out what's wrong, you may need to look into it yourself. As a start, perhaps reduce your code even further, since it doesn't sound like it has to do with Image::ExifTool. The following seems to work fine on my system:

use warnings; use strict; use File::Find::Rule; my $rule = File::Find::Rule->file->name(qr/\.jpe?g$/i)->start('/'); while ( defined( my $file = $rule->match ) ) { print "$file\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11120082]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2020-09-28 00:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (143 votes). Check out past polls.

    Notices?