An understanding of the viscoelastic properties of molecularly thin lubricant film is essential to clarify tribological issues of head-disk interface (HDI) in high-density recording hard disk drives. Characteristic conditions for the HDI occur when lubricant molecules are extremely confined in the gap between the head and the disk surfaces, and the surfaces slide at high speeds. The lower the flying height, the more this confinement affects the flying characteristics. However, a few attempts have been made at clarifying the dynamic viscoelastic properties of confined lubricant molecules. This is because a method of measuring the dynamic shear force has not yet been established. Fiber wobbling method enables us to measure the shear force with a detection limit of less than 1 nN. Additionally, frequency of shear can be set at several kHz. Further, the gap which confines the lubricant is controlled with a resolution of 0.1 nm. Using the FWM, we investigated the effect that confinement had on the dynamic viscoelastic properties of perfluoropolyether lubricants on a magnetic disk. We found that the viscosity started to increase at a gap width that was less than a few hundred nanometers, which is hundreds of times larger than the molecular size. On the other hand, elasticity suddenly appeared at a gap width that was less than a few nanometers, which is equivalent to a few molecular sizes. Both the viscosity and elasticity increased monotonically as the gap decreased.