Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://483137]
help
Chatterbox?
[Corion]: marto: Yeah - their mother picked all three of them up at the kindergarden to then go to the hospital, and all three of them were well behaved, and all also were quite obedient when they came home, so they recognized the situation
[Corion]: Nice to see that the kids have some understanding of important things that happen and the appropriate behaviour :)
[marto]: at times mine surprise me with this behavior :)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2016-12-08 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (137 votes). Check out past polls.