Quantum dynamics of a particle confined in a box with time-dependent wall is revisited by considering some unexplored aspects of the problem. In particular, the case of dynamical confinement in a time-dependent box in the presence of purely time-varying external potential is treated by obtaining exact solution. Also, some external potentials approving separation of space and time variables in the Schrödinger equation with time-dependent boundary conditions are classified. Time-dependence of the average kinetic energy and average quantum force are analyzed. A model for optical high harmonic generation in the presence of dynamical confinement and external monochromatic time-dependent homogeneous electric field is proposed.