In this paper, we theoretically show that the field-free molecular alignment can be controlled by shaping the femtosecond laser pulse with a periodic phase step modulation, involving the maximum degree and temporal structure of the molecular alignment. We show that the molecular alignment can be completely suppressed or reconstructed as that by the transform-limited laser pulse, the temporal structure of the alignment transient can be controlled with a desired shape, and the molecular alignment and antialignment for any temporal structure can be switched. Furthermore, we also show that both the degree and direction of the molecular alignment at a fix time delay can be continuously modulated.