We consider the mean field kinetic equations describing the relaxation dynamics of a lattice model of a fluid confined in a porous material. The dynamical theory embodied in these equations can be viewed as a mean field approximation to a Kawasaki dynamics Monte Carlo simulation of the system, as a theory of diffusion, or as a dynamical density functional theory. The solutions of the kinetic equations for long times coincide with the solutions of the static mean field equations for the inhomogeneous lattice gas. The approach is applied to a lattice gas model of a fluid confined in a finite length slit pore open at both ends and is in contact with the bulk fluid at a temperature where capillary condensation and hysteresis occur. The states emerging dynamically during irreversible changes in the chemical potential are compared with those obtained from the static mean field equations for states associated with a quasistatic progression up and down the adsorption/desorption isotherm. In the capillary transition region, the dynamics involves the appearance of undulates ͑adsorption͒ and liquid bridges ͑adsorption and desorption͒ which are unstable in the static mean field theory in the grand ensemble for the open pore but which are stable in the static mean field theory in the canonical ensemble for an infinite pore.