First advice: use proper lower/uppercase:
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://domain2.com/$1 [R=301,NC,L]
Then maybe you forgot the "L" for "Last rule".
When you say "it won't redirect any folders e.g. domain.com/folder/ won't redirect to domain2.com/folder/" please explain what it gives, what it should give, and what it give without the rewrite rules. Then I could help you further.
Two hints:
Please try to use the RewriteLog
directive: it helps you to track down such problems:
# Trace:
# (!) file gets big quickly, remove in prod environments:
RewriteLog "/web/logs/mywebsite.rewrite.log"
RewriteLogLevel 9
RewriteEngine On
My favorite tool to check for regexp:
http://www.quanetic.com/Regex (don't forget to choose ereg(POSIX) instead of preg(PCRE)!)