maybe this will help
$files = `getFileList -fld ("c:\\yourDir\\")`;
this will list all of the files and folders in the specfied directory
I cant remember how to get the pixel info in, i know it has something to do with a thingy called iffinfo. This will allow you to read in data from .iff files.
that's some info on it there I think
you can download it here
it looks quite old though you may want to look for a better version I just did a searchon google for "iffinfo" and it came up with these and loads more.
I'll check back and see how you go with this
Technical Director - Framestore
Currently working on: Your Highness