You can easily do this within an action.
But if you PhotoShop CS2, you can do it directly from the bridge (and leverage PS.) Just go
Tools-> PhotoShop -> Impage Processor...
And it lets you set a max height and width, where to save it and to what format. Just select a set of images and run the command.
I used to make my own action to do it, but no longer.