Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2021-03-02 21:46 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (64 votes). Check out past polls.