Using dissipative particle dynamics simulations, we study the swelling of lamellae-forming diblock copolymer films in a nonselective solvent. Both the parallel and the perpendicular orientations of lamellae in the film are studied. The swelling of the film with parallel lamellae is accompanied by an increase of their number. In doing so, the lamellar thickness reveals nonmonotonous behavior: affine growth (low degree of solvent uptake) is succeeded by a decrease in thickness (high degree of solvent uptake). Whereas the first regime reflects a finite size (film thickness) effect, the decrease is a more common effect, which is also valid for perpendicular lamellae, and is due to shrinkage of the diblock copolymers due to the shielding of unfavorable AB contacts by the solvent molecules. The film swelling leads to an increase of the number of perpendicular lamellae as well. However, such an increase is only possible if the film at first is dissolved and then condensed absorbing a certain amount of solvent. Otherwise, splitting of the lamellae requires a large-scale mass transport which is realizable neither in modeling nor in experiment. Instead of splitting, the perpendicular lamellae can tilt upon swelling. This process is much faster and satisfies the space-filling condition at the thinning of the lamellae. That is why tilted lamellae are often observed in experiments and computer simulations. We demonstrate also that the distribution of the absorbed solvent in the film is inhomogeneous with a maximum at the AB interfaces. The kinetics of the parallel lamellae swelling is compared with experimental data.