In this work dynamic headspace capillary gas chromatography coupled with multivariate statistical techniques was applied to distinguish milks subjected to different heat treatments (pasteurization, direct ultrahigh-temperature method, and ''in-bottle'' sterilization). Results were obtained by taking into account a reduced, though significant, number of volatile compounds (acetone, 2-butanone, 2-pentanone, 2-heptanone, 3-methylbutanal, pentanal, hexanal, heptanal, dimethyl disulfide, toluene, and limonene). Moreover, the concentration of these volatile compounds, especially aldehydes and ketones, provided discriminant information about storage time and storage temperature in both whole and partially skimmed UHT milk. The analytical method was quite simple, rapid, and reliable and permitted the analysis of a large number of milks to be carried out by using a small volume of sample. This work represents an attempt to apply a method, generally used only for research purposes, to the quality assessment of heat-treated milk.