What JJJ said. You'd have to write a script to get if's in an action.
Another easy way to batch for the web is in Bridge - tools, photoshop, image processor
You have the option to run an action, but, if I recall, the default that comes with PS runs the action at the beginning before the image is resized. Russell Bown has an amended version that runs the action at the end - which is when you'd want to sharpen.