Through analysis of the statistical mechanical equations for a thin adsorbed film (gas, liquid, or solid) on a solid substrate or confined within a pore, it is possible to express the equilibrium thermodynamic properties of the film as a function of just two dimensionless parameters: a nanoscale wetting parameter, αw, and pore width, H*. The wetting parameter, αw, is defined in terms of molecular parameters for the adsorbed film and substrate and so is applicable at the nanoscale and for films of any phase. The main assumptions in the treatment are that (a) the substrate structure is not significantly affected by the adsorbed layer and (b) the diameter of the adsorbate molecules is not very small compared to the spacing of atoms in the solid substrate. We show that different surface geometries of the substrate (e.g., slit, cylindrical, and spherical pores) and various models of wall heterogeneity can be accounted for through a well-defined correction to the wetting parameter; no new dimensionless variables are introduced. Experimental measurements are reported for contact angles for various liquids on several planar substrates and are shown to be closely correlated with the nanoscale wetting parameter. We apply this approach to phase separation in nanopores of various geometries. Molecular simulation results for the phase diagram in confinement, obtained by the flat histogram Monte Carlo method, are reported and are shown to be closely similar to experimental results for capillary condensation, melting, and the triple point. The value of the wetting parameter, αw, is shown to determine the qualitative behavior (e.g., increase vs decrease in the melting temperature, capillary condensation vs evaporation), whereas the pore width determines the magnitude of the confinement effect. The triple point temperature and pressure for the confined phase are always lower than those for the bulk phase for all cases studied.