Any thoughts on how to delete channels in an action? I sometimes create channels during editing, with the names blue_copy, red_copy etc., but when I run a flatten layer, it leaves these channels behind, so that I get errors when I try to write out to jpg in an action. I've tried creating dummy channels in the files used for creating the action, and deleting them, but if photoshop doesnt see that channel name while running the action, it generates an error and stops.
My goal is to batch process thousands of photographs to jpgs of various resolutions, and only about 5% of the photographs have custom channels.