Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Find Photos Taken During A Certain Time Range

by haukex (Archbishop)
on Jul 30, 2020 at 19:18 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120082]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found