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

Re: Find all JPEG files in a directory

by izut (Chaplain)
on Aug 11, 2005 at 23:35 UTC ( #483149=note: print w/ replies, xml ) Need Help??


in reply to Find all JPEG files in a directory

I think it is useful for making it portable across different plataforms - win32 doesn't have 'find', unless you install cygwin. It is a good exercise for beginners.

You can use File::Find to find files and then File::MimeInfo or File::MMagic to check its file type. If you want to extract some data from images (size, resolution, etc) you could use PerlMagick .

Update: Figured out that File::Info is broken under Windows. File::MMagic worked well in my tests with images, but not with mp3 files.


Igor S. Lopes - izut
surrender to perl. your code, your rules.


Comment on Re: Find all JPEG files in a directory

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-09-22 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (203 votes), past polls