If you have access to all DICOM images in file system use a command line tool that dumps the information your interested in from all files (e.g. write a script that uses the command line tool).
If the DICOM images are stored in a PACS or any other kind of DICOM network node you have to transfer them first to your local hard drive and proceed as described above.
If you want to develop an application that does the above look for a DICOM library that fits your programming language and needs.
This would be a great question to post in our new free medical imaging question and answer forum ( www.imagingQA.com ), there are already a few DICOM questions on there. If useful, please feel free to open a new topic at the link below :