We consider deflection of polarizable molecules by inhomogeneous optical fields, and analyze the role of molecular orientation and rotation in the scattering process. It is shown that molecular rotation induces spectacular rainbow-like features in the distribution of the scattering angle. Moreover, by preshaping molecular angular distribution with the help of short and strong femtosecond laser pulses, one may efficiently control the scattering process, manipulate the average deflection angle and its distribution, and reduce substantially the angular dispersion of the deflected molecules. We provide quantum and classical treatment of the deflection process. The effects of strong deflecting field on the scattering of rotating molecules are considered by the means of the adiabatic invariants formalism. This new control scheme opens new ways for many applications involving molecular focusing, guiding and trapping by optical and static fields.