http://support.microsoft.com/kb/825751this is what you need to be messing around with.
look down about 3/4 of the page, and check out the example, it list all that you need in a simple text.
you can always pipe this out to a file by using the > operator.
That should be it, simply run it on the folders you need info on.