add_action('init', 'assign_category_to_multiple_posts');
function assign_category_to_multiple_posts() {
$add_category = 1;
$exlude_posts_in_category = 2;
$the_query = new WP_Query;
$posts = $the_query->query(array('post_type'=>'post', 'nopaging'=>'true', 'category__not_in' => $exlude_posts_in_category));
foreach($posts as $post) {
wp_set_object_terms($post->ID, $add_category, 'category', true);
}
}
Ok! It works )
$add_category = 1; change 1 to the ID of category that you wish to add
$exlude_posts_in_category = 2; change 2 to the ID of category of posts that you don't want to apply to, or array(2, 3) for few cats.
Add the code to the functions.php and save,
open Posts list in new window, may be you will need to reload it a couple of times to see a result.
Then delete the code from functions.php
Make a database backup before!
At least I found the plugin for this task. It has the option "Preserve existing categories for selected posts". So you can choose :) The difference - with the pugin you need to unselect some posts manually.
http://www.aswinanand.com/2008/10/bulk-assign-categories-to-multiple-posts/