Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Find all JPEG files in a directory

by chibiryuu (Beadle)
on Aug 11, 2005 at 21:07 UTC ( #483137=note: print w/ replies, xml ) Need Help??

in reply to Find all JPEG files in a directory

find2perl might give you some hints to how to do this in Perl.  Which will work on stupid systems like Windows which don't have "find".  (Well, the command "find" really means "fgrep", and "dir/b/s" kinda works like "find"....)

use File::Find; find( sub {/\.jpe?g$/i and print "$File::Find::name\n"}, @dirs, );
perldoc File::Find But usually I'd do what all the other comments suggest, use "find", if I were on a non-Windows system.

Comment on Re: Find all JPEG files in a directory
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2015-10-07 15:59 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (190 votes), past polls