For more than half a century, high-resolution infrared spectroscopy has played a crucial role in probing molecular structure and dynamics. Such studies have so far been largely restricted to relatively small and simple systems, because at room temperature even molecules of modest size already occupy many millions of rotational/vibrational states, yielding highly congested spectra that are difficult to assign. Targeting more complex molecules requires methods that can record broadband infrared spectra (that is, spanning multiple vibrational bands) with both high resolution and high sensitivity. However, infrared spectroscopic techniques have hitherto been limited either by narrow bandwidth and long acquisition time1, or by low sensitivity and resolution2. Cavity-enhanced direct frequency comb spectroscopy (CE-DFCS) combines the inherent broad bandwidth and high resolution of an optical frequency comb with the high detection sensitivity provided by a high-finesse enhancement cavity3,4, but it still suffers from spectral congestion5. Here we show that this problem can be overcome by using buffer gas cooling6to produce continuous, cold samples of molecules that are then subjected to CE-DFCS. This integration allows us to acquire a rotationally resolved direct absorption spectrum in the C–H stretching region of nitromethane, a model system that challenges our understanding of large-amplitude vibrational motion7,8,9. We have also used this technique on several large organic molecules that are of fundamental spectroscopic and astrochemical relevance, including naphthalene10, adamantane11and hexamethylenetetramine12. These findings establish the value of our approach for studying much larger and more complex molecules than have been probed so far, enabling complex molecules and their kinetics to be studied with orders-of-magnitude improvements in efficiency, spectral resolution and specificity.