Imagemagick can do this - I've just had a go for you....
test.tga TGA 745x1053 745x1053+0+0 8-bit DirectClass 2.353MBB 0.218u 0:00.228
You can also control the output of the command - for example:
C:\temp>identify -format "%f,%w,%h" test.tga
Edit: You could save the output parameters in a few ways, but off the top of my head, if you are already working with batch files, you could use the identify command to create its own batch file and then run it in a way that the variables become command line parameters - for example:
identify -format "tgachk2.bat %f %w %h" test.tga > tgatmp.bat
The above script creates tgatmp.bat 'on the fly' and then runs it, which in turn runs tgachk2.bat with the %f %w and %h variables as command line parameters you can refer to as %1 %2 and %3.
ECHO The parameters were: %1 %2 and %3
There are other ways of doing this, but hopefully the above is easy to follow and edit to include any other steps you need to complete.