So this is real is. I'm going to give you the code, then record an action to play this javascript file that you copy and past the code into.
you can then run a batch, and
var imageHeight = activeDocument.height
var imageWidth = activeDocument.width
var imageName = activeDocument.name.toString()
var imageDementions = new File ("~/desktop/dementions.txt")
imageDementions.open('a');
imageDementions.write(imageName + ", " + imageHeight + ", " + imageWidth + "\n");
activeDocument.close(SaveOptions.DONOTSAVECHANGES)
imageDementions.close();
that should get you through it. I have functions built to search for files in a folder, then run whatever you want to those files, but just running this script in a batch is much easier.