I don't understand because this code does not run. foldername is a real folder in /var/www, apache2 runs but browser does not redirect that directory forcing SSL.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} ^/foldername/.\*
RewriteRule ^(.\*)$ https://host.name.com$1 [R,L]
It looks like you might have the regular expressions mixed up a bit. Try:
Don't escape the '*' with a '\'.